# ============================================================================= # VNtyper Docker Compose Configuration # ============================================================================= # Modern Docker Compose format (version field removed as per 2025 best practices) # Reference: https://docs.docker.com/compose/compose-file/ # ============================================================================= services: redis: image: redis:7.2-alpine3.19 container_name: vntyper_redis ports: - "6379:6379" networks: - vntyper_network healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 3s retries: 3 start_period: 5s restart: unless-stopped api: build: # Use parent directory as context to access vntyper/ package # Security: Sensitive files excluded via .dockerignore in project root context: .. dockerfile: docker/Dockerfile image: vntyper:latest container_name: vntyper_api command: uvicorn app.main:app --host 0.0.0.0 --port 8000 environment: - CELERY_BROKER_URL=redis://redis:6379/0 - CELERY_RESULT_BACKEND=redis://redis:6379/0 - MAX_RESULT_AGE_DAYS=7 volumes: - /mnt/c/development/VNtyper/download/:/opt/vntyper/input - /mnt/c/development/VNtyper/out/output:/opt/vntyper/output depends_on: redis: condition: service_healthy networks: - vntyper_network ports: - "8000:8000" healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8000/health"] interval: 30s timeout: 10s retries: 3 start_period: 60s restart: unless-stopped worker: build: # Use parent directory as context to access vntyper/ package # Security: Sensitive files excluded via .dockerignore in project root context: .. dockerfile: docker/Dockerfile image: vntyper:latest container_name: vntyper_worker command: celery -A app.celery_app worker --loglevel=info environment: - CELERY_BROKER_URL=redis://redis:6379/0 - CELERY_RESULT_BACKEND=redis://redis:6379/0 - MAX_RESULT_AGE_DAYS=7 volumes: - /mnt/c/development/VNtyper/download/:/opt/vntyper/input - /mnt/c/development/VNtyper/out/output:/opt/vntyper/output depends_on: redis: condition: service_healthy api: condition: service_healthy networks: - vntyper_network restart: unless-stopped beat: build: # Use parent directory as context to access vntyper/ package # Security: Sensitive files excluded via .dockerignore in project root context: .. dockerfile: docker/Dockerfile image: vntyper:latest container_name: vntyper_beat command: celery -A app.celery_app beat --loglevel=info environment: - CELERY_BROKER_URL=redis://redis:6379/0 - CELERY_RESULT_BACKEND=redis://redis:6379/0 - MAX_RESULT_AGE_DAYS=7 volumes: - /mnt/c/development/VNtyper/download/:/opt/vntyper/input - /mnt/c/development/VNtyper/out/output:/opt/vntyper/output depends_on: redis: condition: service_healthy api: condition: service_healthy networks: - vntyper_network restart: unless-stopped networks: vntyper_network: driver: bridge