This repository was archived by the owner on Mar 7, 2026. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
157 lines (148 loc) · 4.1 KB
/
Copy pathdocker-compose.yml
File metadata and controls
157 lines (148 loc) · 4.1 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
version: '3.8'
# SECURITY WARNING: This docker-compose.yml contains hardcoded passwords for development.
# For production:
# 1. Copy .env.example to .env and update with secure passwords
# 2. Use Docker secrets for sensitive data
# 3. Never commit .env to version control
services:
# PostgreSQL - Primary data store
postgres:
image: postgres:15-alpine
container_name: agentmesh-postgres
environment:
POSTGRES_DB: agentmesh
POSTGRES_USER: agentmesh
POSTGRES_PASSWORD: agentmesh_dev_password
POSTGRES_INITDB_ARGS: "-E UTF8"
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U agentmesh"]
interval: 10s
timeout: 5s
retries: 5
networks:
- agentmesh
# Redis - Caching layer
redis:
image: redis:7-alpine
container_name: agentmesh-redis
ports:
- "6379:6379"
command: redis-server --appendonly yes --maxmemory 256mb --maxmemory-policy allkeys-lru
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- agentmesh
# AgentMesh Server
server:
build:
context: .
dockerfile: Dockerfile.server
container_name: agentmesh-server
environment:
AGENTMESH_ENV: development
AGENTMESH_LOG_LEVEL: DEBUG
AGENTMESH_STORAGE_BACKEND: redis
AGENTMESH_REDIS_HOST: redis
AGENTMESH_REDIS_PORT: 6379
AGENTMESH_POSTGRES_HOST: postgres
AGENTMESH_POSTGRES_PORT: 5432
AGENTMESH_POSTGRES_DB: agentmesh
AGENTMESH_POSTGRES_USER: agentmesh
AGENTMESH_POSTGRES_PASSWORD: agentmesh_dev_password
ports:
- "8080:8080" # API server
- "9090:9090" # Metrics
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- ./data:/data
networks:
- agentmesh
healthcheck:
test: ["CMD", "python", "-c", "import httpx; httpx.get('http://localhost:8080/health', timeout=5)"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
# AgentMesh Sidecar (Example)
sidecar:
build:
context: .
dockerfile: Dockerfile.sidecar
container_name: agentmesh-sidecar
environment:
AGENTMESH_MODE: sidecar
AGENTMESH_LOG_LEVEL: DEBUG
AGENTMESH_SERVER_URL: http://server:8080
ports:
- "8081:8081" # Proxy
- "9091:9091" # Metrics
depends_on:
- server
networks:
- agentmesh
healthcheck:
test: ["CMD", "python", "-c", "import os; os.path.exists('/var/run/agentmesh/healthy')"]
interval: 15s
timeout: 5s
retries: 3
# Prometheus (Metrics collection)
prometheus:
image: prom/prometheus:latest
container_name: agentmesh-prometheus
ports:
- "9093:9090" # Changed from 9090 to avoid conflict with server metrics
volumes:
- ./deployments/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'
networks:
- agentmesh
# Grafana (Metrics visualization)
grafana:
image: grafana/grafana:latest
container_name: agentmesh-grafana
ports:
- "3000:3000"
environment:
GF_SECURITY_ADMIN_USER: admin
GF_SECURITY_ADMIN_PASSWORD: agentmesh
GF_USERS_ALLOW_SIGN_UP: "false"
volumes:
- grafana_data:/var/lib/grafana
- ./deployments/grafana/dashboards:/etc/grafana/provisioning/dashboards
- ./deployments/grafana/datasources:/etc/grafana/provisioning/datasources
depends_on:
- prometheus
networks:
- agentmesh
volumes:
postgres_data:
driver: local
redis_data:
driver: local
prometheus_data:
driver: local
grafana_data:
driver: local
networks:
agentmesh:
driver: bridge
name: agentmesh-network