Dockerfile — production image built on python:3.11-slim. Installs ODBC Driver 17 for SQL Server, Python dependencies, and runs Gunicorn with 4 workers.
docker-compose.yml — local development setup. Mounts a ./logs volume, forwards port 5000, and wires environment variables from a .env file.
Docker Compose reads variable values from your .env file using shell variable expansion (${VAR:-default}). The Azure SQL variables are forwarded directly to the container; if they are empty, the application uses the SQLite fallback.
The CORS_ORIGINS variable is hardcoded in docker-compose.yml to http://localhost:3000,http://localhost:5173 for local development. Override it in your .env if your frontend runs on a different port.
The Compose file mounts ./logs from the project root into /app/logs inside the container:
volumes: - ./logs:/app/logs
Gunicorn access and error logs written to /app/logs are therefore persisted on the host. No database volume is configured — when running without Azure SQL, SQLite writes to taskforge.db inside the container and is lost when the container is removed. Mount an additional volume if you need to persist the SQLite file between container restarts.
Both the Dockerfile and docker-compose.yml configure a health check against the /api/health endpoint:
curl http://localhost:5000/api/health
The container is marked healthy after 40 seconds and checked every 30 seconds thereafter (3 retries, 10-second timeout). Docker Compose will show the health status in docker-compose ps.