-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
83 lines (72 loc) · 2.15 KB
/
docker-compose.yml
File metadata and controls
83 lines (72 loc) · 2.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
services:
prompt-chaining:
# Build configuration
build:
context: .
dockerfile: Dockerfile
# Image configuration
image: prompt-chaining:latest
container_name: prompt-chaining-api
# Port mapping
ports:
- "8000:8000"
# Environment configuration
# Load configuration from .env file - REQUIRED for ANTHROPIC_API_KEY and JWT_SECRET_KEY
env_file:
- .env
# Override or add environment variables
environment:
# API server binding - 0.0.0.0 allows external connections
API_HOST: 0.0.0.0
# API_PORT is read from .env file (default: 8000)
# Uncomment below to override .env value:
# API_PORT: 8001
# Optional: Ensure JSON logging format in container
# LOG_FORMAT: json
# Restart policy - restart unless explicitly stopped
restart: unless-stopped
# Health check (matches Dockerfile healthcheck)
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health/"]
interval: 30s
timeout: 3s
start_period: 5s
retries: 3
# Network configuration
networks:
- prompt-chaining-network
# Optional: Resource limits (uncomment and adjust for production)
# deploy:
# resources:
# limits:
# cpus: "1"
# memory: 512M
# reservations:
# cpus: "0.5"
# memory: 256M
# Optional: Volume mounts for development/debugging (uncomment for development)
# volumes:
# # Bind mount source code for development (requires rebuild when switching between dev/prod)
# - ./src:/app/src
# # Bind mount logs directory (ensure logs directory exists locally)
# - ./logs:/app/logs
# # Bind mount .env for development
# - ./.env:/app/.env:ro
networks:
prompt-chaining-network:
driver: bridge
# Usage:
# Standard production build and run:
# docker-compose up -d
#
# With development overrides for hot-reload:
# docker-compose -f docker-compose.yml -f docker-compose.dev.yml up
#
# View logs:
# docker-compose logs -f orchestrator-worker
#
# Stop containers:
# docker-compose down
#
# Rebuild image:
# docker-compose build --no-cache