version: '3.8' services: postgres: image: postgres:16-alpine environment: POSTGRES_USER: opencomply POSTGRES_PASSWORD: opencomply POSTGRES_DB: opencomply ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U opencomply"] interval: 5s timeout: 5s retries: 5 redis: image: redis:7-alpine ports: - "6379:6379" healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 3s retries: 5 backend: build: context: . dockerfile: Dockerfile target: backend ports: - "8000:8000" environment: DATABASE_URL: postgresql+asyncpg://opencomply:opencomply@postgres:5432/opencomply REDIS_URL: redis://redis:6379/0 SECRET_KEY: change-me-in-production depends_on: postgres: condition: service_healthy redis: condition: service_healthy volumes: - ./backend:/app celery_worker: build: context: . dockerfile: Dockerfile target: backend command: celery -A app.celery_app worker --loglevel=info environment: DATABASE_URL: postgresql+asyncpg://opencomply:opencomply@postgres:5432/opencomply REDIS_URL: redis://redis:6379/0 depends_on: postgres: condition: service_healthy redis: condition: service_healthy volumes: - ./backend:/app frontend: build: context: . dockerfile: Dockerfile target: frontend-build ports: - "3000:3000" command: npm run dev -- --host 0.0.0.0 volumes: - ./frontend:/app - /app/node_modules depends_on: - backend volumes: postgres_data: