version: "3.8" services: postgres: image: postgres:16-alpine container_name: ent-postgres restart: always environment: POSTGRES_USER: enterprise POSTGRES_PASSWORD: enterprise123 POSTGRES_DB: enterprise_ai volumes: - postgres_data:/var/lib/postgresql/data - ./init-db:/docker-entrypoint-initdb.d ports: - "5432:5432" healthcheck: test: ["CMD-SHELL", "pg_isready -U enterprise"] interval: 5s timeout: 5s retries: 5 redis: image: redis:7-alpine container_name: ent-redis restart: always command: redis-server --appendonly yes --requirepass redis123 volumes: - redis_data:/data ports: - "6379:6379" backend: build: context: ./backend dockerfile: Dockerfile container_name: ent-backend restart: always depends_on: postgres: condition: service_healthy redis: condition: service_started environment: DATABASE_URL: postgresql+asyncpg://enterprise:enterprise123@postgres:5432/enterprise_ai REDIS_URL: redis://:redis123@redis:6379/0 JWT_SECRET: dev-secret-key-change-in-production-32chars LLM_API_KEY: ${LLM_API_KEY:-sk-placeholder} LLM_API_BASE: ${LLM_API_BASE:-https://api.openai.com/v1} LLM_MODEL: ${LLM_MODEL:-gpt-4o-mini} ports: - "8000:8000" volumes: - ./backend:/app frontend: build: context: ./frontend dockerfile: Dockerfile container_name: ent-frontend restart: always depends_on: - backend ports: - "3000:80" nginx: image: nginx:alpine container_name: ent-nginx restart: always depends_on: - frontend - backend volumes: - ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro ports: - "80:80" volumes: postgres_data: redis_data: