version: "3.9" services: db: image: postgres:16 restart: unless-stopped environment: POSTGRES_USER: transcreation POSTGRES_PASSWORD: transcreation POSTGRES_DB: transcreation ports: - "5492:5432" volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U transcreation"] interval: 5s timeout: 5s retries: 5 redis: image: redis:7-alpine restart: unless-stopped ports: - "6389:6379" healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 5s retries: 5 backend: build: context: ./backend dockerfile: Dockerfile restart: unless-stopped ports: - "8040:8000" env_file: - .env volumes: - ./backend:/app - ./storage:/storage - ./seed:/app/seed depends_on: db: condition: service_healthy redis: condition: service_healthy command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload celery_worker: build: context: ./backend dockerfile: Dockerfile restart: unless-stopped env_file: - .env volumes: - ./backend:/app - ./storage:/storage - ./seed:/app/seed depends_on: db: condition: service_healthy redis: condition: service_healthy command: celery -A app.tasks.celery_app worker --loglevel=info --concurrency=4 volumes: pgdata: