version: '3.8' services: postgres: image: pgvector/pgvector:pg16 container_name: llmgateway-postgres environment: POSTGRES_DB: llmgateway POSTGRES_USER: admin POSTGRES_PASSWORD: secret ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U admin"] interval: 10s timeout: 5s retries: 5 redis: image: redis:7-alpine container_name: llmgateway-redis ports: - "6379:6379" volumes: - redis_data:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 3s retries: 5 backend: build: context: ./backend dockerfile: Dockerfile container_name: llmgateway-backend environment: DATABASE_URL: jdbc:postgresql://postgres:5432/llmgateway DATABASE_USER: admin DATABASE_PASSWORD: secret REDIS_HOST: redis REDIS_PORT: 6379 GEMINI_API_KEY: ${GEMINI_API_KEY} OPENAI_API_KEY: ${OPENAI_API_KEY:-} ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY:-} ports: - "8080:8080" depends_on: postgres: condition: service_healthy redis: condition: service_healthy restart: unless-stopped frontend: build: context: ./frontend dockerfile: Dockerfile container_name: llmgateway-frontend environment: VITE_API_URL: http://localhost:8080 ports: - "3000:3000" depends_on: - backend restart: unless-stopped volumes: postgres_data: redis_data: