-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
213 lines (198 loc) · 6.02 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
213 lines (198 loc) · 6.02 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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
version: "3.9"
# ============================================================
# DEV MODE: Infrastructure + Gateway only
# Frontend and backend services run on local machine
# Run with: ./dev.sh up
# ============================================================
services:
grandflow-db:
image: postgres:15
container_name: grandflow-db
restart: always
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
ports:
- "5432:5432"
volumes:
- grandflow_dev_data:/var/lib/postgresql/data
- ./docker/postgres/init-db.sh:/docker-entrypoint-initdb.d/init-db.sh
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
minio:
image: pgsty/minio:RELEASE.2026-08-04T00-00-00Z
container_name: grandflow-minio
command: server /data --console-address ":9001"
ports:
- "9000:9000" # S3 API
- "9001:9001" # Web console
environment:
- MINIO_ROOT_USER=${STORAGE_ACCESS_KEY}
- MINIO_ROOT_PASSWORD=${STORAGE_SECRET_KEY}
volumes:
- grandflow_dev_minio_data:/data
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
container_name: grandflow-redis
ports:
- "6379:6379"
volumes:
- grandflow_dev_redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
rabbitmq:
image: rabbitmq:3-management-alpine
container_name: grandflow-rabbitmq
ports:
- "5672:5672" # AMQP protocol
- "15672:15672" # Management UI
- "15692:15692" # Prometheus metrics
volumes:
- grandflow_dev_rabbitmq_data:/var/lib/rabbitmq
environment:
- RABBITMQ_DEFAULT_USER=${RABBITMQ_USER}
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_PASS}
command: sh -c "rabbitmq-plugins enable rabbitmq_prometheus && rabbitmq-server"
networks:
- grandflow
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
interval: 10s
timeout: 5s
retries: 5
flower:
image: mher/flower:latest
container_name: grandflow-flower
environment:
- CELERY_BROKER_URL=amqp://${RABBITMQ_USER}:${RABBITMQ_PASS}@rabbitmq:5672//
- FLOWER_BROKER_API=http://${RABBITMQ_USER}:${RABBITMQ_PASS}@rabbitmq:${RABBITMQ_MANAGEMENT_PORT}/api/
ports:
- "5555:5555" # Flower Web UI port
networks:
- grandflow
depends_on:
rabbitmq:
condition: service_healthy
# Nginx Proxy (routes to local services at host.docker.internal)
nginx:
image: nginx:latest
container_name: api-proxy
ports:
- "8082:80"
volumes:
- ./nginx/nginx-dev.conf:/etc/nginx/nginx.conf:ro
depends_on:
redis:
condition: service_healthy
networks:
- grandflow
extra_hosts:
- "host.docker.internal:host-gateway"
# ============================================================
# MONITORING & OBSERVABILITY (Dev only)
# ============================================================
# Jaeger - APM for distributed tracing
jaeger:
image: jaegertracing/all-in-one:latest
container_name: jaeger-dev
ports:
- "16686:16686" # Jaeger UI: http://localhost:16686
environment:
- COLLECTOR_OTLP_ENABLED=true
networks:
- grandflow
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:16686"]
interval: 10s
timeout: 5s
retries: 3
# OpenTelemetry Collector - OTLP receiver and processor
otel-collector:
image: otel/opentelemetry-collector-contrib:latest
container_name: otel-collector-dev
command: ["--config=/etc/otel-collector-config.yml"]
ports:
- "4317:4317" # OTLP GRPC receiver
- "4318:4318" # OTLP HTTP receiver
- "9411:9411" # Zipkin receiver
- "8889:8889" # Prometheus metrics exporter
volumes:
- ./monitoring/otel-collector-config.yml:/etc/otel-collector-config.yml:ro
depends_on:
- jaeger
- prometheus
networks:
- grandflow
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:13133/healthz"]
interval: 10s
timeout: 5s
retries: 3
# Prometheus - Metrics collection
prometheus:
image: prom/prometheus:latest
container_name: prometheus-dev
ports:
- "9090:9090"
volumes:
- ./monitoring/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus_dev_data:/prometheus
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
networks:
- grandflow
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:9090/-/healthy"]
interval: 10s
timeout: 5s
retries: 3
# Grafana - Dashboard & visualization
grafana:
image: grafana/grafana:latest
container_name: grafana-dev
ports:
- "3002:3000" # http://localhost:3002 (admin:admin)
environment:
- GF_SECURITY_ADMIN_USER=${GF_ADMIN_USER}
- GF_SECURITY_ADMIN_PASSWORD=${GF_ADMIN_PASSWORD}
- GF_INSTALL_PLUGINS=${GF_INSTALL_PLUGINS}
volumes:
- grafana_dev_data:/var/lib/grafana
- ./monitoring/grafana/provisioning:/etc/grafana/provisioning:ro
depends_on:
prometheus:
condition: service_healthy
networks:
- grandflow
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"]
interval: 10s
timeout: 5s
retries: 3
networks:
grandflow:
driver: bridge
volumes:
grandflow_dev_data:
grandflow_dev_minio_data:
grandflow_dev_redis_data:
grandflow_dev_rabbitmq_data:
prometheus_dev_data:
grafana_dev_data:
# Note: In dev mode, services (users, budget) run locally on the host.
# Nginx routes to them via host.docker.internal.
# Only infrastructure (DB, Redis) runs in Docker.
# Monitoring: OpenTelemetry Collector (OTLP), Jaeger (tracing), Prometheus (metrics), Grafana (dashboards)