Overview
The Docker deployment uses a multi-stage build with Python 3.9-slim as the base image, includes health checks, and exposes the application on port 10000.Prerequisites
Docker Installed
Docker Engine 20.10 or higher
OpenAI API Key
Valid API key with Whisper access
Dockerfile
The official Dockerfile is located atbackend/deployment/docker/Dockerfile:
Quick Start
Configuration Options
Environment Variables
Pass environment variables using-e flag:
Port Mapping
Map the container port to a different host port:Volume Mounts
Mount logs directory for persistence:Using Docker Compose
For easier management, use Docker Compose. Create adocker-compose.yml:
Health Checks
The container includes built-in health monitoring:Container Management
View Logs
Restart Container
Stop and Remove
Update to Latest Version
Production Deployment
Using a Reverse Proxy
For production, run behind nginx or traefik: nginx configuration:Resource Limits
Limit CPU and memory usage:Auto-restart Policy
no: Don’t restart automatically (default)on-failure: Restart only if container exits with erroralways: Always restart if stoppedunless-stopped: Always restart unless explicitly stopped
Docker Registry
Push to Docker Hub
Push to AWS ECR
Troubleshooting
Container Won’t Start
Check logs for errors:- Missing
OPENAI_API_KEY - Port 10000 already in use
- Insufficient memory
Health Check Failing
Enter the container to debug:High Memory Usage
Monitor resource usage:Permission Errors
If you get permission errors with volume mounts:Next Steps
Environment Variables
Configure all environment variables
CORS Setup
Configure CORS for your frontend
EC2 Deployment
Deploy to AWS EC2 with Docker Compose
Kubernetes
Scale with Kubernetes

