115 lines
3.5 KiB
YAML
115 lines
3.5 KiB
YAML
version: "3.9"
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:16
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: ai_contract_platform
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres -d ai_contract_platform"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 20
|
|
|
|
redis:
|
|
image: redis:7
|
|
restart: unless-stopped
|
|
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
restart: unless-stopped
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_started
|
|
environment:
|
|
APP_NAME: AI Contract Platform
|
|
APP_ENV: production
|
|
SECRET_KEY: ${SECRET_KEY:?Set SECRET_KEY in .env before starting production}
|
|
DATABASE_URL: postgresql+psycopg://postgres:postgres@postgres:5432/ai_contract_platform
|
|
REDIS_URL: redis://redis:6379/0
|
|
MINIO_ENDPOINT: 192.168.3.90:9000
|
|
MINIO_ACCESS_KEY: minioadmin
|
|
MINIO_SECRET_KEY: minioadmin
|
|
MINIO_BUCKET: contracts
|
|
SHARED_AI_PLATFORM_BASE_URL: http://192.168.3.90:18011
|
|
SHARED_AI_PLATFORM_API_PREFIX: /api/v0.1
|
|
SHARED_AI_PLATFORM_APP_ID: ai-contract-platform
|
|
SHARED_AI_PLATFORM_API_KEY: "shared-ai-platform-admin-dev-token"
|
|
SHARED_AI_PLATFORM_TIMEOUT_SECONDS: 180
|
|
SHARED_AI_PLATFORM_LEGAL_REVIEW_ENABLED: "true"
|
|
SHARED_AI_PLATFORM_LEGAL_REVIEW_FALLBACK_TO_LOCAL: "false"
|
|
command: >
|
|
sh -c "alembic upgrade head &&
|
|
uvicorn app.main:app --host 0.0.0.0 --port 8000"
|
|
volumes:
|
|
- backend_storage:/app/storage
|
|
ports:
|
|
- "8001:8000"
|
|
|
|
legal-change-impact-worker:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
restart: unless-stopped
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
backend:
|
|
condition: service_started
|
|
environment:
|
|
APP_NAME: AI Contract Platform
|
|
APP_ENV: production
|
|
SECRET_KEY: ${SECRET_KEY:?Set SECRET_KEY in .env before starting production}
|
|
DATABASE_URL: postgresql+psycopg://postgres:postgres@postgres:5432/ai_contract_platform
|
|
REDIS_URL: redis://redis:6379/0
|
|
MINIO_ENDPOINT: 192.168.3.90:9000
|
|
MINIO_ACCESS_KEY: minioadmin
|
|
MINIO_SECRET_KEY: minioadmin
|
|
MINIO_BUCKET: contracts
|
|
SHARED_AI_PLATFORM_BASE_URL: http://192.168.3.90:18011
|
|
SHARED_AI_PLATFORM_API_PREFIX: /api/v0.1
|
|
SHARED_AI_PLATFORM_APP_ID: ai-contract-platform
|
|
SHARED_AI_PLATFORM_API_KEY: "shared-ai-platform-admin-dev-token"
|
|
SHARED_AI_PLATFORM_TIMEOUT_SECONDS: 180
|
|
SHARED_AI_PLATFORM_LEGAL_REVIEW_ENABLED: "true"
|
|
SHARED_AI_PLATFORM_LEGAL_REVIEW_FALLBACK_TO_LOCAL: "false"
|
|
LEGAL_CHANGE_IMPACT_WORKER_BATCH_SIZE: 10
|
|
LEGAL_CHANGE_IMPACT_WORKER_INTERVAL_SECONDS: 300
|
|
LEGAL_CHANGE_IMPACT_SEMANTIC_ENABLED: "true"
|
|
command: >
|
|
python -m app.tasks.legal_change_impact_worker
|
|
--limit 10
|
|
--interval-seconds 300
|
|
volumes:
|
|
- backend_storage:/app/storage
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile
|
|
args:
|
|
BACKEND_BASE_URL: http://backend:8000
|
|
restart: unless-stopped
|
|
depends_on:
|
|
backend:
|
|
condition: service_started
|
|
environment:
|
|
NEXT_PUBLIC_API_BASE_URL: /api/v1
|
|
BACKEND_BASE_URL: http://backend:8000
|
|
NODE_ENV: production
|
|
ports:
|
|
- "3003:3000"
|
|
|
|
volumes:
|
|
postgres_data:
|
|
backend_storage:
|