version: '3.8' services: ethics-engine: build: context: .. dockerfile: docker/Dockerfile ports: - "8000:8000" environment: - ETHICS_ENGINE_ENV=production - REDIS_URL=redis://redis:6379 - DATABASE_URL=postgresql://postgres:postgres@db:5432/ethics depends_on: - redis - db volumes: - ./models:/app/models restart: unless-stopped redis: image: redis:7-alpine ports: - "6379:6379" restart: unless-stopped db: image: postgres:15-alpine environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres - POSTGRES_DB=ethics ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data restart: unless-stopped nginx: image: nginx:alpine ports: - "80:80" - "443:443" volumes: - ./nginx.conf:/etc/nginx/nginx.conf:ro depends_on: - ethics-engine restart: unless-stopped volumes: postgres_data: