forked from OneUptime/oneuptime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.base.yml
445 lines (381 loc) · 11.7 KB
/
docker-compose.base.yml
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
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
version: '3.7'
x-common-variables: &common-variables
HOST: ${HOST}
HTTP_PROTOCOL: ${HTTP_PROTOCOL}
NODE_ENV: ${ENVIRONMENT}
BILLING_ENABLED: ${BILLING_ENABLED}
BILLING_PUBLIC_KEY: ${BILLING_PUBLIC_KEY}
SUBSCRIPTION_PLAN_BASIC: ${SUBSCRIPTION_PLAN_BASIC}
SUBSCRIPTION_PLAN_GROWTH: ${SUBSCRIPTION_PLAN_GROWTH}
SUBSCRIPTION_PLAN_SCALE: ${SUBSCRIPTION_PLAN_SCALE}
SUBSCRIPTION_PLAN_ENTERPRISE: ${SUBSCRIPTION_PLAN_ENTERPRISE}
METERED_PLAN_ACTIVE_MONITORING: ${METERED_PLAN_ACTIVE_MONITORING}
ANALYTICS_KEY: ${ANALYTICS_KEY}
ANALYTICS_HOST: ${ANALYTICS_HOST}
SERVER_ACCOUNTS_HOSTNAME: accounts
SERVER_REALTIME_HOSTNAME: realtime
SERVER_DASHBOARD_API_HOSTNAME: dashboard-api
SERVER_WORKFLOW_HOSTNAME: workflow
SERVER_LINK_SHORTENER_HOSTNAME: link-shortener
SERVER_ALERT_HOSTNAME: alert
SERVER_INGESTOR_HOSTNAME: ingestor
SERVER_TEST_SERVER_HOSTNAME: test-server
SERVER_FILE_HOSTNAME: file
SERVER_HOME_HOSTNAME: home
SERVER_IDENTITY_HOSTNAME: identity
SERVER_NOTIFICATION_HOSTNAME: notification
SERVER_WORKERS_HOSTNAME: workers
SERVER_STATUS_PAGE_HOSTNAME: status-page
SERVER_DASHBOARD_HOSTNAME: dashboard
SERVER_ADMIN_DASHBOARD_HOSTNAME: admin-dashboard
SERVER_API_REFERENCE_HOSTNAME: api-reference
OTEL_COLLECTOR_HOSTNAME: otel-collector
#Ports. Usually they don't need to change.
DASHBOARD_API_PORT: ${DASHBOARD_API_PORT}
API_REFERENCE_PORT: ${API_REFERENCE_PORT}
WORKFLOW_PORT: ${WORKFLOW_PORT}
LINK_SHORTENER_PORT: ${LINK_SHORTENER_PORT}
ALERT_PORT: ${ALERT_PORT}
INGESTOR_PORT: ${INGESTOR_PORT}
PROBE_PORT: ${PROBE_PORT}
TEST_SERVER_PORT: ${TEST_SERVER_PORT}
FILE_PORT: ${FILE_PORT}
HOME_PORT: ${HOME_PORT}
IDENTITY_PORT: ${IDENTITY_PORT}
NOTIFICATION_PORT: ${NOTIFICATION_PORT}
REALTIME_PORT: ${REALTIME_PORT}
WORKERS_PORT: ${WORKERS_PORT}
ACCOUNTS_PORT: ${ACCOUNTS_PORT}
STATUS_PAGE_PORT: ${STATUS_PAGE_PORT}
DASHBOARD_PORT: ${DASHBOARD_PORT}
ADMIN_DASHBOARD_PORT: ${ADMIN_DASHBOARD_PORT}
OTEL_COLLECTOR_PORT: ${OTEL_COLLECTOR_PORT}
x-common-ui-variables: &common-ui-variables
<<: *common-variables
IS_SERVER: false
STATUS_PAGE_CNAME_RECORD: ${STATUS_PAGE_CNAME_RECORD}
x-common-server-variables: &common-server-variables
<<: *common-variables
ONEUPTIME_SECRET: ${ONEUPTIME_SECRET}
DATABASE_PORT: ${DATABASE_PORT}
DATABASE_USERNAME: ${DATABASE_USERNAME}
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
DATABASE_NAME: ${DATABASE_NAME}
DATABASE_HOST: ${DATABASE_HOST}
DATABASE_SSL_CA: ${DATABASE_SSL_CA}
DATABASE_SSL_KEY: ${DATABASE_SSL_KEY}
DATABASE_SSL_CERT: ${DATABASE_SSL_CERT}
DATABASE_SSL_REJECT_UNAUTHORIZED: ${DATABASE_SSL_REJECT_UNAUTHORIZED}
REDIS_USERNAME: ${REDIS_USERNAME}
REDIS_PASSWORD: ${REDIS_PASSWORD}
REDIS_HOST: ${REDIS_HOST}
REDIS_PORT: ${REDIS_PORT}
REDIS_DB: ${REDIS_DB}
REDIS_TLS_CA: ${REDIS_TLS_CA}
REDIS_TLS_SENTINEL_MODE: ${REDIS_TLS_SENTINEL_MODE}
ENCRYPTION_SECRET: ${ENCRYPTION_SECRET}
BILLING_PRIVATE_KEY: ${BILLING_PRIVATE_KEY}
BILLING_PUBLIC_KEY: ${BILLING_PUBLIC_KEY}
BILLING_ENABLED: ${BILLING_ENABLED}
CLICKHOUSE_USER: ${CLICKHOUSE_USER}
CLICKHOUSE_PASSWORD: ${CLICKHOUSE_PASSWORD}
CLICKHOUSE_DATABASE: ${CLICKHOUSE_DATABASE}
CLICKHOUSE_HOST: ${CLICKHOUSE_HOST}
CLICKHOUSE_PORT: ${CLICKHOUSE_PORT}
IS_SERVER: true
DISABLE_AUTOMATIC_INCIDENT_CREATION: ${DISABLE_AUTOMATIC_INCIDENT_CREATION}
services:
minio:
networks:
- oneuptime
image: minio/minio:latest
restart: always
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
volumes:
- minio:/data
haraka:
networks:
- oneuptime
image: oneuptime/haraka:${APP_TAG}
restart: always
environment:
SMTP_USERNAME: oneuptime
SMTP_PASSWORD: ${INTERNAL_SMTP_PASSWORD}
DKIM_SELECTOR: oneuptime
DOMAIN: ${INTERNAL_SMTP_SENDING_DOMAIN}
DKIM_PRIVATE_KEY: ${INTERNAL_SMTP_DKIM_PRIVATE_KEY_AS_BASE64}
DKIM_PUBLIC_KEY: ${INTERNAL_SMTP_DKIM_PUBLIC_KEY_AS_BASE64}
redis:
image: redis:7.0.12
restart: always
networks:
- oneuptime
command: redis-server --requirepass "${REDIS_PASSWORD}" --save "" --appendonly no
environment:
REDIS_PASSWORD: ${REDIS_PASSWORD}
clickhouse:
image: clickhouse/clickhouse-server:23.7
restart: always
environment:
CLICKHOUSE_USER: ${CLICKHOUSE_USER}
CLICKHOUSE_PASSWORD: ${CLICKHOUSE_PASSWORD}
CLICKHOUSE_DB: ${CLICKHOUSE_DATABASE}
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 1
networks:
- oneuptime
volumes:
- clickhouse:/var/lib/clickhouse/
postgres:
image: postgres:15
restart: always
environment:
POSTGRES_USER: ${DATABASE_USERNAME}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_DB: ${DATABASE_NAME}
networks:
- oneuptime
volumes:
- postgres:/var/lib/postgresql/data
notification:
networks:
- oneuptime
restart: always
environment:
<<: *common-server-variables
PORT: ${NOTIFICATION_PORT}
SMS_DEFAULT_COST_IN_CENTS: ${SMS_DEFAULT_COST_IN_CENTS}
CALL_DEFAULT_COST_IN_CENTS_PER_MINUTE: ${CALL_DEFAULT_COST_IN_CENTS_PER_MINUTE}
SMS_HIGH_RISK_COST_IN_CENTS: ${SMS_HIGH_RISK_COST_IN_CENTS}
CALL_HIGH_RISK_COST_IN_CENTS_PER_MINUTE: ${CALL_HIGH_RISK_COST_IN_CENTS_PER_MINUTE}
INTERNAL_SMTP_EMAIL: ${INTERNAL_SMTP_EMAIL}
INTERNAL_SMTP_PASSWORD: ${INTERNAL_SMTP_PASSWORD}
depends_on:
- haraka
accounts:
networks:
- oneuptime
restart: always
environment:
<<: *common-ui-variables
PORT: ${ACCOUNTS_PORT}
depends_on:
- identity
admin-dashboard:
networks:
- oneuptime
restart: always
environment:
<<: *common-ui-variables
PORT: ${ADMIN_DASHBOARD_PORT}
depends_on:
- identity
- accounts
dashboard:
networks:
- oneuptime
restart: always
environment:
<<: *common-ui-variables
PORT: ${DASHBOARD_PORT}
depends_on:
- identity
- accounts
status-page:
networks:
- oneuptime
restart: always
environment:
<<: *common-ui-variables
PORT: ${STATUS_PAGE_PORT}
depends_on:
- accounts
- dashboard-api
test-server:
networks:
- oneuptime
restart: always
environment:
<<: *common-server-variables
PORT: ${TEST_SERVER_PORT}
dashboard-api:
networks:
- oneuptime
restart: always
environment:
<<: *common-server-variables
PORT: ${DASHBOARD_API_PORT}
depends_on:
- redis
- postgres
- notification
links:
- redis
- postgres
- notification
link-shortener:
networks:
- oneuptime
restart: always
environment:
<<: *common-server-variables
PORT: ${LINK_SHORTENER_PORT}
depends_on:
- redis
- postgres
links:
- redis
- postgres
workflow:
networks:
- oneuptime
restart: always
environment:
<<: *common-server-variables
PORT: ${WORKFLOW_PORT}
depends_on:
- redis
- postgres
- notification
links:
- redis
- postgres
- notification
workers:
networks:
- oneuptime
restart: always
environment:
<<: *common-server-variables
PORT: ${WORKERS_PORT}
ENVIRONMENT: ${ENVIRONMENT}
depends_on:
- postgres
- notification
links:
- postgres
- notification
volumes:
- ./Certs:/usr/src/Certs
probe-1:
networks:
- oneuptime
restart: always
environment:
<<: *common-server-variables
PORT: ${PROBE_PORT}
PROBE_NAME: ${GLOBAL_PROBE_1_NAME}
PROBE_DESCRIPTION: ${GLOBAL_PROBE_1_DESCRIPTION}
PROBE_MONITORING_WORKERS: ${GLOBAL_PROBE_1_MONITORING_WORKERS}
PROBE_KEY: ${GLOBAL_PROBE_1_KEY}
INGESTOR_URL: http://${INGESTOR_HOSTNAME}
PROBE_MONITOR_FETCH_LIMIT: ${GLOBAL_PROBE_1_MONITOR_FETCH_LIMIT}
depends_on:
- ingestor
links:
- ingestor
probe-2:
networks:
- oneuptime
restart: always
environment:
<<: *common-server-variables
PORT: ${PROBE_PORT}
PROBE_NAME: ${GLOBAL_PROBE_2_NAME}
PROBE_DESCRIPTION: ${GLOBAL_PROBE_2_DESCRIPTION}
PROBE_MONITORING_WORKERS: ${GLOBAL_PROBE_2_MONITORING_WORKERS}
PROBE_KEY: ${GLOBAL_PROBE_2_KEY}
INGESTOR_URL: http://${INGESTOR_HOSTNAME}
PROBE_MONITOR_FETCH_LIMIT: ${GLOBAL_PROBE_2_MONITOR_FETCH_LIMIT}
depends_on:
- ingestor
links:
- ingestor
identity:
networks:
- oneuptime
restart: always
environment:
<<: *common-server-variables
PORT: ${IDENTITY_PORT}
depends_on:
- redis
- postgres
- notification
links:
- redis
- postgres
- notification
otel-collector:
networks:
- oneuptime
restart: always
ports:
- '4317:4317'
ingestor:
networks:
- oneuptime
restart: always
environment:
<<: *common-server-variables
PORT: ${INGESTOR_PORT}
depends_on:
- redis
- postgres
- notification
links:
- redis
- postgres
- notification
file:
networks:
- oneuptime
restart: always
environment:
<<: *common-server-variables
PORT: ${FILE_PORT}
depends_on:
- postgres
links:
- postgres
home:
networks:
- oneuptime
environment:
<<: *common-ui-variables
PORT: ${HOME_PORT}
api-reference:
networks:
- oneuptime
restart: always
environment:
<<: *common-ui-variables
PORT: ${API_REFERENCE_PORT}
ingress:
depends_on:
- identity
- accounts
- dashboard-api
- dashboard
- home
- notification
- otel-collector
restart: always
networks:
- oneuptime
environment:
<<: *common-variables
ports:
- '${ONEUPTIME_HTTP_PORT}:80'
- '${ONEUPTIME_HTTPS_PORT}:443'
volumes:
- ./Certs:/etc/nginx/certs
volumes:
postgres:
clickhouse:
minio:
networks:
oneuptime:
driver: bridge