-
Notifications
You must be signed in to change notification settings - Fork 173
Expand file tree
/
Copy pathdocker-compose.halfstack-main.yml
More file actions
243 lines (227 loc) · 6.04 KB
/
docker-compose.halfstack-main.yml
File metadata and controls
243 lines (227 loc) · 6.04 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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
configs:
prometheus_config:
file: ./prometheus.yaml
otel_collector_config:
file: ./otel-collector-config.yaml
loki_config:
file: ./loki-config.yaml
tempo_config:
file: ./tempo-config.yaml
supergraph_schema:
file: ./supergraph.graphql
gateway_config:
file: ./gateway.config.ts
services:
backendai-half-db:
image: postgres:16.3-alpine
restart: unless-stopped
command: postgres -c 'max_connections=256'
networks:
- half
ports:
- "8100:5432"
environment:
- POSTGRES_DB=backend
- POSTGRES_PASSWORD=develove
volumes:
- "./volumes/${DATADIR_PREFIX:-.}/postgres-data:/var/lib/postgresql/data:rw"
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 5s
timeout: 3s
retries: 10
backendai-half-db-exporter:
image: prometheuscommunity/postgres-exporter:v0.17.1
profiles: ["observability"]
restart: unless-stopped
networks:
- half
environment:
- DATA_SOURCE_URI=backendai-half-db:5432/backend?sslmode=disable
- DATA_SOURCE_USER=postgres
- DATA_SOURCE_PASS=develove
ports:
- "9187:9187"
backendai-half-redis:
image: redis:7.2.11-alpine
restart: unless-stopped
networks:
- half
ports:
- "8110:6379"
volumes:
- "./volumes/${DATADIR_PREFIX:-.}/redis-data:/data:rw"
command: >
redis-server
--appendonly yes
healthcheck:
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
interval: 5s
timeout: 3s
retries: 10
backendai-half-redis-exporter:
image: oliver006/redis_exporter:v1.73.0
profiles: ["observability"]
restart: unless-stopped
networks:
- half
command: >
--redis.addr redis://backendai-half-redis:6379
--include-system-metrics
--include-config-metrics
--include-modules-metrics
ports:
- "9121:9121"
backendai-half-etcd:
image: quay.io/coreos/etcd:v3.5.14
restart: unless-stopped
volumes:
- "./volumes/${DATADIR_PREFIX:-.}/etcd-data:/etcd-data:rw"
networks:
- half
ports:
- "8120:2379"
command: >
/usr/local/bin/etcd
--name backendai-etcd
--data-dir /etcd-data
--listen-client-urls http://0.0.0.0:2379
--advertise-client-urls http://0.0.0.0:2379
--listen-peer-urls http://0.0.0.0:2380
--initial-advertise-peer-urls http://0.0.0.0:2380
--initial-cluster backendai-etcd=http://0.0.0.0:2380
--initial-cluster-token backendai-etcd-token
--initial-cluster-state new
--enable-v2=true
--auto-compaction-retention 1
--metrics=extensive
healthcheck:
test: ["CMD", "etcdctl", "endpoint", "health"]
interval: 5s
timeout: 3s
retries: 10
backendai-half-grafana:
image: grafana/grafana-enterprise:11.4.0
profiles: ["observability"]
restart: unless-stopped
networks:
- half
ports:
- "3000:3000"
environment:
- GF_SECURITY_ADMIN_USER=backend
- GF_SECURITY_ADMIN_PASSWORD=develove
volumes:
- half-grafana:/var/lib/grafana:rw
- "./grafana-dashboards:/var/lib/grafana/dashboards:ro"
- "./grafana-provisioning/dashboards:/etc/grafana/provisioning/dashboards:ro"
- "./grafana-provisioning/datasources:/etc/grafana/provisioning/datasources:ro"
backendai-half-pyroscope:
image: grafana/pyroscope:1.9.2
profiles: ["observability"]
restart: unless-stopped
networks:
- half
ports:
- "4040:4040"
volumes:
- half-pyroscope:/var/lib/pyroscope:rw
backendai-half-prometheus:
image: prom/prometheus:v3.1.0
restart: unless-stopped
networks:
- half
configs:
- source: prometheus_config
target: /etc/prometheus/prometheus.yaml
extra_hosts:
- "host.docker.internal:host-gateway"
command:
- '--config.file=/etc/prometheus/prometheus.yaml'
ports:
- "9090:9090"
backendai-half-otel-collector:
image: otel/opentelemetry-collector-contrib:0.126.0
profiles: ["observability"]
restart: unless-stopped
networks:
- half
command: ["--config=/etc/otel-collector-config.yaml"]
configs:
- source: otel_collector_config
target: /etc/otel-collector-config.yaml
ports:
- "4317:4317"
- "4318:4318"
backendai-half-loki:
image: grafana/loki:3.5.0
profiles: ["observability"]
restart: unless-stopped
networks:
- half
command: -config.file=/etc/loki/local-config.yaml
ports:
- "3100:3100"
configs:
- source: loki_config
target: /etc/loki/local-config.yaml
backendai-half-tempo:
image: grafana/tempo:2.7.2
profiles: ["observability"]
restart: unless-stopped
networks:
- half
command: [ "-config.file=/etc/tempo.yaml" ]
configs:
- source: tempo_config
target: /etc/tempo.yaml
volumes:
- half-tempo:/var/tempo
ports:
- "3200" # tempo
- "4317" # otlp grpc
backendai-half-apollo-router:
image: ghcr.io/graphql-hive/gateway:2.1.12
restart: unless-stopped
networks:
- half
ports:
- "4000:4000"
command: ["supergraph"]
environment:
- HOST=0.0.0.0
- PORT=4000
configs:
- source: supergraph_schema
target: /gateway/supergraph.graphql
- source: gateway_config
target: /gateway/gateway.config.ts
extra_hosts:
- "host.docker.internal:host-gateway"
backendai-half-minio:
image: minio/minio:latest
profiles: ["storage"]
restart: unless-stopped
networks:
- half
ports:
- "9000:9000" # API port
- "9001:9001" # Console port
environment:
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin
volumes:
- half-minio:/data:rw
command: server /data --console-address ":9001"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 5s
timeout: 3s
retries: 10
networks:
half:
volumes:
half-grafana:
half-pyroscope:
half-tempo:
half-minio: