| services: | |
| db: | |
| image: pgvector/pgvector:pg16 | |
| restart: unless-stopped | |
| environment: | |
| POSTGRES_USER: depscreen | |
| POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-depscreen_dev} | |
| POSTGRES_DB: depscreen | |
| volumes: | |
| - pgdata:/var/lib/postgresql/data | |
| ports: | |
| - "5432:5432" | |
| healthcheck: | |
| test: ["CMD-SHELL", "pg_isready -U depscreen"] | |
| interval: 5s | |
| timeout: 5s | |
| retries: 5 | |
| deploy: | |
| resources: | |
| limits: | |
| memory: 512M | |
| backend: | |
| build: | |
| context: . | |
| dockerfile: Dockerfile | |
| ports: | |
| - "8000:8000" | |
| restart: unless-stopped | |
| depends_on: | |
| db: | |
| condition: service_healthy | |
| environment: | |
| DATABASE_URL: postgresql://depscreen:${POSTGRES_PASSWORD:-depscreen_dev}@db:5432/depscreen | |
| JWT_SECRET: ${JWT_SECRET:?JWT_SECRET is required} | |
| LLM_API_KEY: ${LLM_API_KEY:-} | |
| LLM_BASE_URL: ${LLM_BASE_URL:-https://generativelanguage.googleapis.com/v1beta/openai/} | |
| LLM_MODEL: ${LLM_MODEL:-gemini-2.5-flash} | |
| ENVIRONMENT: ${ENVIRONMENT:-development} | |
| CORS_ORIGINS: ${CORS_ORIGINS:-["http://localhost:3000"]} | |
| REDIS_URL: ${REDIS_URL:-} | |
| volumes: | |
| - ./ml/models:/app/ml/models:ro | |
| - ./ml/knowledge_base:/app/ml/knowledge_base:ro | |
| healthcheck: | |
| test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"] | |
| interval: 30s | |
| timeout: 10s | |
| retries: 3 | |
| start_period: 60s | |
| deploy: | |
| resources: | |
| limits: | |
| memory: 4G | |
| frontend: | |
| build: | |
| context: ../frontend | |
| dockerfile: Dockerfile | |
| ports: | |
| - "3000:80" | |
| restart: unless-stopped | |
| depends_on: | |
| - backend | |
| volumes: | |
| pgdata: | |