-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
139 lines (131 loc) · 3.57 KB
/
Copy pathdocker-compose.yml
File metadata and controls
139 lines (131 loc) · 3.57 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
version: '3.8'
services:
# CAM Protocol Core Service
cam-core:
build:
context: .
dockerfile: Dockerfile
target: prod
image: cam-protocol/core:latest
container_name: cam-core
ports:
- "8080:8080"
environment:
- NODE_ENV=production
- LOG_LEVEL=info
- PORT=8080
- OPENAI_API_KEY=${OPENAI_API_KEY:-demo-key-replace-me}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-demo-key-replace-me}
volumes:
- ./config:/app/config
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
restart: unless-stopped
depends_on:
- redis
- postgres
# Redis for caching and rate limiting
redis:
image: redis:7-alpine
container_name: cam-redis
ports:
- "6379:6379"
volumes:
- redis-data:/data
command: redis-server --appendonly yes
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 3
restart: unless-stopped
# PostgreSQL for persistent storage
postgres:
image: postgres:15-alpine
container_name: cam-postgres
ports:
- "5432:5432"
environment:
- POSTGRES_USER=cam_user
- POSTGRES_PASSWORD=cam_password
- POSTGRES_DB=cam_db
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U cam_user -d cam_db"]
interval: 10s
timeout: 5s
retries: 3
restart: unless-stopped
# Demo OpenAI-compatible API service (for testing without real API keys)
mock-openai:
image: ghcr.io/complete-arbitration-mesh/mock-openai:latest
container_name: cam-mock-openai
ports:
- "8081:8081"
environment:
- PORT=8081
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8081/health"]
interval: 30s
timeout: 10s
retries: 3
restart: unless-stopped
# Demo Anthropic-compatible API service (for testing without real API keys)
mock-anthropic:
image: ghcr.io/complete-arbitration-mesh/mock-anthropic:latest
container_name: cam-mock-anthropic
ports:
- "8082:8082"
environment:
- PORT=8082
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8082/health"]
interval: 30s
timeout: 10s
retries: 3
restart: unless-stopped
# Prometheus for metrics collection
prometheus:
image: prom/prometheus:v2.45.0
container_name: cam-prometheus
ports:
- "9090:9090"
volumes:
- ./monitoring/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus-data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--web.enable-lifecycle'
restart: unless-stopped
depends_on:
- cam-core
# Grafana for metrics visualization
grafana:
image: grafana/grafana:10.0.3
container_name: cam-grafana
ports:
- "3000:3000"
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_USERS_ALLOW_SIGN_UP=false
volumes:
- ./monitoring/grafana/provisioning:/etc/grafana/provisioning
- ./monitoring/grafana/dashboards:/var/lib/grafana/dashboards
- grafana-data:/var/lib/grafana
restart: unless-stopped
depends_on:
- prometheus
volumes:
redis-data:
postgres-data:
prometheus-data:
grafana-data: