version: "3.9" services: postgres: image: postgres:16-alpine environment: POSTGRES_DB: supply_intelligence POSTGRES_USER: supply POSTGRES_PASSWORD: supply123 ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data - ./migrations:/docker-entrypoint-initdb.d:ro healthcheck: test: ["CMD-SHELL", "pg_isready -U supply -d supply_intelligence"] interval: 5s timeout: 3s retries: 5 supply-intelligence: build: . ports: - "8080:8080" depends_on: postgres: condition: service_healthy environment: DATABASE_URL: "postgres://supply:supply123@postgres:5432/supply_intelligence?sslmode=disable" OPENAI_API_KEY: "${OPENAI_API_KEY:-}" ANTHROPIC_API_KEY: "${ANTHROPIC_API_KEY:-}" restart: unless-stopped volumes: postgres_data: