version: "3.8" services: postgres: image: postgres:16-alpine container_name: ai-ops-postgres environment: POSTGRES_USER: aiops POSTGRES_PASSWORD: aiops123 POSTGRES_DB: ai_ops ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data - ./tech/migrations:/docker-entrypoint-initdb.d healthcheck: test: ["CMD-SHELL", "pg_isready -U aiops -d ai_ops"] interval: 5s timeout: 5s retries: 5 redis: image: redis:7-alpine container_name: ai-ops-redis ports: - "6379:6379" volumes: - redis_data:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 5s retries: 5 ai-ops: build: . container_name: ai-ops-app ports: - "8080:8080" environment: AI_OPS_CONFIG: /app/config.yaml depends_on: postgres: condition: service_healthy redis: condition: service_healthy restart: unless-stopped volumes: postgres_data: redis_data: