96 lines
2.1 KiB
YAML
96 lines
2.1 KiB
YAML
name: "legal-ai-assistant"
|
|
services:
|
|
|
|
backend:
|
|
container_name: backend
|
|
build:
|
|
context: .
|
|
dockerfile: backend/Dockerfile
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8001:8001"
|
|
env_file:
|
|
- .env
|
|
depends_on:
|
|
litellm:
|
|
condition: service_healthy
|
|
mcp:
|
|
condition: service_started
|
|
healthcheck:
|
|
test: curl --fail http://localhost:8001/ || exit 1
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 30s
|
|
|
|
frontend:
|
|
container_name: frontend
|
|
build:
|
|
context: .
|
|
dockerfile: frontend/Dockerfile
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8000:8000"
|
|
env_file:
|
|
- .env
|
|
depends_on:
|
|
backend:
|
|
condition: service_healthy
|
|
db:
|
|
condition: service_healthy
|
|
|
|
db:
|
|
image: postgres:16-alpine
|
|
container_name: db
|
|
restart: unless-stopped
|
|
ports:
|
|
- "5432:5432"
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
POSTGRES_DB: ${POSTGRES_DB}
|
|
volumes:
|
|
- db_data:/var/lib/postgresql/data
|
|
- ./frontend/schema.sql:/docker-entrypoint-initdb.d/schema.sql
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "sh -c 'pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}'"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 10s
|
|
|
|
|
|
litellm:
|
|
image: ghcr.io/berriai/litellm:main-stable
|
|
container_name: litellm
|
|
restart: unless-stopped
|
|
ports:
|
|
- "4000:4000"
|
|
env_file:
|
|
- .env
|
|
volumes:
|
|
- ./litellm-config.yaml:/app/config.yaml
|
|
command: ['--config', '/app/config.yaml', '--port', '4000']
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "python -c \"import urllib.request; urllib.request.urlopen('http://localhost:4000/health/liveliness')\""]
|
|
interval: 15s
|
|
timeout: 10s
|
|
retries: 5
|
|
start_period: 60s
|
|
|
|
mcp:
|
|
container_name: mcp
|
|
build:
|
|
context: .
|
|
dockerfile: backend/tools/mcp/Dockerfile
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8002:8002"
|
|
env_file:
|
|
- .env
|
|
|
|
volumes:
|
|
db_data:
|
|
name: db_data |