2.0 KiB
2.0 KiB
AIAss Docker Setup
This document explains how to run the AIAss gRPC service using Docker.
Prerequisites
- Docker Desktop installed and running
- Docker Compose (usually comes with Docker Desktop)
Quick Start
Using Docker Compose (Recommended)
-
Navigate to the AIAss project directory:
cd Presentation/AIAss
-
Build and run the service:
docker-compose up --build
-
The service will be available at:
- HTTP: http://localhost:5000
- HTTPS: https://localhost:5001
Using Docker directly
-
Build the Docker image:
docker build -t aiass .
-
Run the container:
docker run -p 5000:80 -p 5001:443 aiass
Configuration
Environment Variables
ASPNETCORE_ENVIRONMENT
: Set toDevelopment
orProduction
ASPNETCORE_URLS
: Configure the URLs the service listens on
Ports
- Port 80: HTTP endpoint
- Port 443: HTTPS endpoint
Development
Hot Reload
For development with hot reload, you can mount the source code:
volumes:
- .:/src
- /src/bin
- /src/obj
Debugging
To debug the containerized application, you can:
- Attach a debugger to the running container
- Use remote debugging tools
- Check logs:
docker-compose logs aiass
Production
For production deployment:
- Set
ASPNETCORE_ENVIRONMENT=Production
- Use proper SSL certificates
- Configure health checks
- Set up monitoring and logging
Troubleshooting
Common Issues
- Port already in use: Change the port mappings in docker-compose.yml
- Build failures: Ensure all dependencies are properly restored
- Permission issues: Check file ownership and Docker user settings
Logs
View container logs:
docker-compose logs -f aiass
Cleanup
Remove containers and images:
docker-compose down
docker system prune -a
Security Notes
- The container runs as a non-root user (
appuser
) - Only necessary ports are exposed
- Environment variables can be overridden for different deployment scenarios