121 lines
3.1 KiB
YAML
121 lines
3.1 KiB
YAML
version: '3.8'
|
|
|
|
# Gemini Parallel Deployment
|
|
# Ports shifted to avoid conflict with production
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:15-alpine
|
|
container_name: mtad-postgres-gemini
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: admin
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD:-gemini-test-password}
|
|
POSTGRES_DB: morethanadiagnosis
|
|
POSTGRES_INITDB_ARGS: "-c shared_preload_libraries=pg_stat_statements"
|
|
volumes:
|
|
- postgres_data_gemini:/var/lib/postgresql/data
|
|
ports:
|
|
- "5433:5432"
|
|
networks:
|
|
- mtad-network-gemini
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U admin -d morethanadiagnosis"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: mtad-redis-gemini
|
|
restart: unless-stopped
|
|
ports:
|
|
- "6380:6379"
|
|
volumes:
|
|
- redis_data_gemini:/data
|
|
networks:
|
|
- mtad-network-gemini
|
|
command: redis-server --appendonly yes --requirepass ${REDIS_PASSWORD:-gemini-test-password}
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
api:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: mtad-api-gemini
|
|
restart: unless-stopped
|
|
environment:
|
|
ENV: development
|
|
DEBUG: "true"
|
|
DATABASE_URL: postgresql://admin:${DB_PASSWORD:-gemini-test-password}@postgres:5432/morethanadiagnosis
|
|
REDIS_URL: redis://:${REDIS_PASSWORD:-gemini-test-password}@redis:6379/0
|
|
SECRET_KEY: ${SECRET_KEY:-gemini-test-secret}
|
|
CORS_ORIGINS: '["http://localhost:3001", "http://localhost:8081"]'
|
|
LOG_LEVEL: DEBUG
|
|
ports:
|
|
- "8001:8000"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
networks:
|
|
- mtad-network-gemini
|
|
volumes:
|
|
- ./app:/app/app:ro
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
frontend:
|
|
build:
|
|
context: ../web
|
|
dockerfile: Dockerfile
|
|
container_name: mtad-web-gemini
|
|
restart: unless-stopped
|
|
expose:
|
|
- "3000"
|
|
networks:
|
|
- mtad-network-gemini
|
|
depends_on:
|
|
- api
|
|
environment:
|
|
NEXT_PUBLIC_API_BASE_URL: http://api:8000/api/v1
|
|
|
|
nginx:
|
|
image: nginx:alpine
|
|
container_name: mtad-nginx-gemini
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8081:80"
|
|
# - "8443:443" # SSL disabled for gemini test to avoid cert conflicts
|
|
volumes:
|
|
- ./nginx.gemini.conf:/etc/nginx/nginx.conf:ro
|
|
# - ./certbot/conf:/etc/letsencrypt:ro # Disable SSL for test
|
|
- ../web/out:/usr/share/nginx/html:ro
|
|
networks:
|
|
- mtad-network-gemini
|
|
depends_on:
|
|
- api
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8080/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
|
|
networks:
|
|
mtad-network-gemini:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
postgres_data_gemini:
|
|
driver: local
|
|
redis_data_gemini:
|
|
driver: local
|