version: "3.8" services: postgres: image: postgres:16-alpine container_name: yottob-postgres environment: POSTGRES_USER: ${POSTGRES_USER:-yottob} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-yottob_password} POSTGRES_DB: ${POSTGRES_DB:-yottob} ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-yottob}"] interval: 5s timeout: 5s retries: 5 redis: image: redis:7-alpine container_name: yottob-redis ports: - "6379:6379" healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 3s retries: 5 app: build: . container_name: yottob-app command: uv run flask --app main run --host=0.0.0.0 --port=5000 environment: DATABASE_URL: postgresql://${POSTGRES_USER:-yottob}:${POSTGRES_PASSWORD:-yottob_password}@postgres:5432/${POSTGRES_DB:-yottob} CELERY_BROKER_URL: redis://redis:6379/0 CELERY_RESULT_BACKEND: redis://redis:6379/0 FLASK_ENV: ${FLASK_ENV:-development} ports: - "5123:5000" volumes: - ./downloads:/app/downloads - ./:/app depends_on: postgres: condition: service_healthy redis: condition: service_healthy restart: unless-stopped celery: build: . container_name: yottob-celery command: uv run celery -A celery_app worker --loglevel=info environment: DATABASE_URL: postgresql://${POSTGRES_USER:-yottob}:${POSTGRES_PASSWORD:-yottob_password}@postgres:5432/${POSTGRES_DB:-yottob} CELERY_BROKER_URL: redis://redis:6379/0 CELERY_RESULT_BACKEND: redis://redis:6379/0 volumes: - ./downloads:/app/downloads - ./:/app depends_on: postgres: condition: service_healthy redis: condition: service_healthy restart: unless-stopped volumes: postgres_data: