forked from graphql-hive/console
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
254 lines (242 loc) · 7.36 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
254 lines (242 loc) · 7.36 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
244
245
246
247
248
249
250
251
252
253
254
name: 'hive-dev'
services:
db:
image: postgres:16.4-alpine
mem_limit: 300m
networks:
- 'stack'
healthcheck:
test: ['CMD-SHELL', 'pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}']
interval: 10s
timeout: 5s
retries: 5
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: registry
PGDATA: /var/lib/postgresql/data
HIVE_OTEL_AUTH_ENDPOINT: 'http://host.docker.internal:3001/otel-auth'
volumes:
- ./.hive-dev/postgresql/db:/var/lib/postgresql/data
ports:
- '5432:5432'
redis:
image: bitnamilegacy/redis:7.4.2
mem_limit: 50m
networks:
- 'stack'
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 30s
timeout: 10s
retries: 10
start_period: 30s
environment:
- ALLOW_EMPTY_PASSWORD=yes
- REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL
ports:
- '6379:6379'
volumes:
- './.hive-dev/redis/db:/bitnami/redis/data'
s3:
image: quay.io/minio/minio:RELEASE.2025-09-07T16-13-09Z
mem_limit: 200m
command: server /data --console-address ":9001"
ports:
- '9000:9000'
- '9001:9001'
networks:
- 'stack'
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:9000/minio/health/live']
interval: 30s
timeout: 20s
retries: 3
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
volumes:
- './.hive-dev/minio/db:/data'
s3_provision_buckets:
image: quay.io/minio/mc:RELEASE.2022-11-17T21-20-39Z
depends_on:
s3:
condition: service_healthy
restart: 'no'
networks:
- 'stack'
entrypoint: >
/bin/sh -c " /usr/bin/mc alias set myminio http://s3:9000 minioadmin minioadmin; /usr/bin/mc
ls myminio/artifacts >/dev/null 2>&1 || /usr/bin/mc mb myminio/artifacts; exit 0"
clickhouse:
image: clickhouse/clickhouse-server:24.8-alpine
mem_limit: 4096m
environment:
CLICKHOUSE_USER: test
CLICKHOUSE_PASSWORD: test
healthcheck:
test: ['CMD', 'wget', '--spider', '-q', 'http://0.0.0.0:8123/ping']
interval: 30s
timeout: 5s
retries: 3
volumes:
- ./.hive-dev/clickhouse/logs:/var/log/clickhouse-server
- ./.hive-dev/clickhouse/db:/var/lib/clickhouse
- ./configs/clickhouse:/etc/clickhouse-server/conf.d
ports:
- '8123:8123'
networks:
- 'stack'
broker:
image: redpandadata/redpanda:v23.3.21
mem_limit: 300m
mem_reservation: 100m
hostname: broker
networks:
- 'stack'
ports:
- '0.0.0.0:9092:9092'
- '0.0.0.0:8081:8081'
- '0.0.0.0:8082:8082'
- '0.0.0.0:9644:9644'
command:
- redpanda
- start
- --smp
- '1'
- --set redpanda.empty_seed_starts_cluster=false
- --seeds "redpanda-1:33145"
- --kafka-addr
- PLAINTEXT://0.0.0.0:29092,OUTSIDE://0.0.0.0:9092
- --advertise-kafka-addr
- PLAINTEXT://broker:29092,OUTSIDE://localhost:9092
- --pandaproxy-addr
- PLAINTEXT://0.0.0.0:28082,OUTSIDE://0.0.0.0:8082
- --advertise-pandaproxy-addr
- PLAINTEXT://broker:28082,OUTSIDE://localhost:8082
- --advertise-rpc-addr redpanda-1:33145
volumes:
- ./.hive-dev/broker/db:/var/lib/kafka/data
oidc-server-mock:
image: ghcr.io/soluto/oidc-server-mock:0.8.6
mem_limit: 200m
ports:
- '7043:80'
environment:
ASPNETCORE_ENVIRONMENT: Development
SERVER_OPTIONS_INLINE: |
{
"AccessTokenJwtType": "JWT",
"Discovery": {
"ShowKeySet": true
},
"Authentication": {
"CookieSameSiteMode": "Lax",
"CheckSessionCookieSameSiteMode": "Lax"
}
}
LOGIN_OPTIONS_INLINE: |
{
"AllowRememberLogin": false
}
LOGOUT_OPTIONS_INLINE: |
{
"AutomaticRedirectAfterSignOut": true
}
USERS_CONFIGURATION_PATH: /tmp/config/users-config.json
CLIENTS_CONFIGURATION_PATH: /tmp/config/clients-config.json
volumes:
- ./configs/oidc-server-mock/clients-config.json:/tmp/config/clients-config.json:ro
- ./configs/oidc-server-mock/users-config.json:/tmp/config/users-config.json:ro
networks:
- 'stack'
otel-collector:
depends_on:
clickhouse:
condition: service_healthy
build:
context: ./configs/otel-collector
dockerfile: ./../../otel-collector.dockerfile
mem_limit: 1000m
environment:
HIVE_OTEL_AUTH_ENDPOINT: 'http://host.docker.internal:3001/otel-auth'
CLICKHOUSE_PROTOCOL: 'http'
CLICKHOUSE_HOST: clickhouse
CLICKHOUSE_PORT: 8123
CLICKHOUSE_USERNAME: test
CLICKHOUSE_PASSWORD: test
volumes:
- ./configs/otel-collector/builder-config.yaml:/builder-config.yaml
- ./configs/otel-collector/config.yaml:/etc/otel-config.yaml
ports:
- '4317:4317'
- '4318:4318'
# OTEL's /metrics endpoint inside the container is on 10254, but we publish it on
# host port 10255. Every Hive service defaults PROMETHEUS_METRICS_PORT to 10254
# (see packages/services/*/environment.ts), so leaving the host mapping as 10254
# would collide with any service a developer runs natively (via `pnpm dev` or the
# VSCode `Start Hive` button). The internal docker-network address
# `otel-collector:10254` is unchanged: Prometheus scrapes that directly.
- '10255:10254'
- '1777:1777'
- '55679:55679'
networks:
- 'stack'
# Observability profile: optional local Grafana + Prometheus stack for rendering
# the production dashboards and alerts against host-running services. Start with:
# docker compose -f docker/docker-compose.dev.yml --profile observability up
# See docs/DEVELOPMENT.md for usage notes.
grafana-dashboard-init:
image: alpine:3.20
profiles:
- observability
command: >
sh -c "
rm -rf /dst/* &&
cp /src/*.json /dst/ &&
sed -i 's/PROM_DATASOURCE_UID/local-prom/g' /dst/*.json &&
sed -i 's/TABLE_SUFFIX/dev/g' /dst/*.json
"
volumes:
- ../deployment/grafana-dashboards:/src:ro
- ./.hive-dev/grafana/dashboards:/dst
networks:
- 'stack'
prometheus:
image: prom/prometheus:v2.55.1
profiles:
- observability
mem_limit: 500m
ports:
- '9090:9090'
# extra_hosts makes `host.docker.internal` resolve on Linux (it already works on Docker
# Desktop for macOS/Windows). Lets Prometheus reach host-running Hive services.
extra_hosts:
- 'host.docker.internal:host-gateway'
volumes:
- ./configs/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- ./.hive-dev/prometheus/data:/prometheus
networks:
- 'stack'
grafana:
image: grafana/grafana:11.3.0
profiles:
- observability
mem_limit: 500m
depends_on:
grafana-dashboard-init:
condition: service_completed_successfully
ports:
- '3030:3000'
environment:
GF_AUTH_ANONYMOUS_ENABLED: 'true'
GF_AUTH_ANONYMOUS_ORG_ROLE: 'Admin'
GF_AUTH_DISABLE_LOGIN_FORM: 'true'
volumes:
- ./configs/grafana/provisioning:/etc/grafana/provisioning:ro
- ./.hive-dev/grafana/dashboards:/etc/grafana/dashboards:ro
- ./.hive-dev/grafana/data:/var/lib/grafana
networks:
- 'stack'
networks:
stack: {}