services: postgres: image: postgres:16-alpine restart: unless-stopped env_file: .env volumes: - postgres-data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"] interval: 10s timeout: 5s retries: 5 redis: image: redis:7-alpine restart: unless-stopped command: ["redis-server", "--appendonly", "yes"] volumes: - redis-data:/data api: build: ./backend restart: unless-stopped env_file: .env depends_on: postgres: condition: service_healthy redis: condition: service_started worker: build: ./backend restart: unless-stopped env_file: .env command: ["python", "-m", "app.workers.worker"] depends_on: - api frontend: build: ./frontend restart: unless-stopped depends_on: - api proxy: image: caddy:2-alpine restart: unless-stopped ports: - "80:80" - "443:443" volumes: - ./deploy/caddy/Caddyfile:/etc/caddy/Caddyfile:ro - caddy-data:/data - caddy-config:/config depends_on: - frontend - api volumes: postgres-data: redis-data: caddy-data: caddy-config: