Repository navigation
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
1202 lines (1196 loc) · 53.7 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
1202 lines (1196 loc) · 53.7 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
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
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
name: boom
volumes:
mongodb:
valkey:
# Staging area for catalog chunks
catalog_data:
kafka_data:
prometheus_data:
grafana_data:
loki_data:
tempo_data:
promtail_positions:
networks:
boom:
traefik-public:
# Allow setting it to false for testing and local development
external: true
services:
# Autoheal will monitor containers with autoheal=true label
# and restart any that are unhealthy or exit with a non-zero status
autoheal:
image: willfarrell/autoheal:latest
container_name: autoheal
restart: always
environment:
- AUTOHEAL_CONTAINER_LABEL=autoheal
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
- boom
mongo:
# 8.2 rather than 8.0: MongoDB 8.0 refuses to start on Linux kernel 6.19 and
# newer (https://jira.mongodb.org/browse/SERVER-121912), which current
# Docker Desktop VMs already ship, so 8.0 cannot run locally at all. 8.0 to
# 8.2 is a supported direct upgrade and 8.2 to 8.0 a supported downgrade,
# provided featureCompatibilityVersion is left at "8.0" until you are ready
# to give up that path.
image: mongo:8.2
hostname: mongo
expose:
- "27017"
environment:
- MONGO_INITDB_ROOT_USERNAME=${BOOM_DATABASE__USERNAME:-mongoadmin}
- MONGO_INITDB_ROOT_PASSWORD=${BOOM_DATABASE__PASSWORD:?BOOM_DATABASE__PASSWORD must be set and non-empty}
volumes:
- ${BOOM_DATA_MONGODB_PATH:-mongodb}:/data/db
restart: always
ulimits:
nofile:
soft: 64000
hard: 64000
deploy:
resources:
limits:
# Caps the WiredTiger cache at 50% of (limit - 1GiB); without a limit
# it's 50% of host RAM, so this and mongo-cutouts each claim half the
# machine. 0 = unlimited. See .env.example.
memory: ${BOOM_MONGO_MEM_LIMIT:-0}
networks:
- boom
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
interval: 10s
start_period: 20s
mongodb-exporter:
image: percona/mongodb_exporter:0.44.0
hostname: mongodb-exporter
depends_on:
mongo:
condition: service_healthy
command:
- --mongodb.uri=mongodb://${BOOM_DATABASE__USERNAME:-mongoadmin}:${BOOM_DATABASE__PASSWORD}@mongo:27017/admin?authSource=admin
- --collector.dbstats
- --collector.collstats
# Required for --collector.collstats to auto-discover collections
- --discovering-mode
- --web.listen-address=:9216
networks:
- boom
restart: always
valkey:
image: valkey/valkey:8.1.4
command:
- valkey-server
- --io-threads
- "4"
environment:
# ALLOW_EMPTY_PASSWORD is recommended only for development.
- ALLOW_EMPTY_PASSWORD=yes
- VALKEY_DISABLE_COMMANDS=FLUSHDB,FLUSHALL
volumes:
- ${BOOM_DATA_VALKEY_PATH:-valkey}:/data
restart: always
networks:
- boom
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 3
valkey-exporter:
image: oliver006/redis_exporter:v1.67.0
hostname: valkey-exporter
depends_on:
valkey:
condition: service_healthy
command:
- --redis.addr=redis://valkey:6379
- --check-keys=*_queue*
networks:
- boom
restart: always
broker:
image: apache/kafka:4.3.1
hostname: broker
networks:
- boom
- traefik-public
restart: always
environment:
KAFKA_BROKER_ID: 1
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT,EXTERNAL:SASL_PLAINTEXT,CONTROLLER:PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://broker:29092,PLAINTEXT_HOST://localhost:9092,EXTERNAL://${KAFKA_EXTERNAL_HOST:-localhost}:9093
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_PROCESS_ROLES: broker,controller
KAFKA_NODE_ID: 1
KAFKA_CONTROLLER_QUORUM_VOTERS: 1@broker:29093
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:29092,CONTROLLER://0.0.0.0:29093,PLAINTEXT_HOST://0.0.0.0:9092,EXTERNAL://0.0.0.0:9093
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_LOG_DIRS: /var/lib/kafka/data
KAFKA_NUM_PARTITIONS: ${KAFKA_NUM_PARTITIONS:-15}
KAFKA_SASL_ENABLED_MECHANISMS: SCRAM-SHA-512
KAFKA_LISTENER_NAME_EXTERNAL_SASL_ENABLED_MECHANISMS: SCRAM-SHA-512
KAFKA_AUTHORIZER_CLASS_NAME: org.apache.kafka.metadata.authorizer.StandardAuthorizer
KAFKA_ALLOW_EVERYONE_IF_NO_ACL_FOUND: 'true'
# Include ANONYMOUS because inter-broker + controller channels use PLAINTEXT (no SASL),
# so the principal resolves to User:ANONYMOUS. Without granting it super-user rights,
# controller metadata or internal admin ops can be unauthorized and cause the process to exit.
# (Alternative: secure internal listener with SASL and drop ANONYMOUS.)
KAFKA_SUPER_USERS: "User:admin;User:ANONYMOUS"
KAFKA_OPTS: "-Djava.security.auth.login.config=/etc/kafka/kafka_server_jaas.conf -Djava.security.egd=file:/dev/./urandom"
volumes:
- ${BOOM_DATA_KAFKA_PATH:-kafka_data}:/var/lib/kafka/data
- ./config/kafka_server_jaas.conf:/etc/kafka/kafka_server_jaas.conf:ro
healthcheck:
# Match wait_for_kafka checks: cluster-id, metadata quorum, configs API, and ACLs
test: ["CMD-SHELL", "set -euo pipefail; \
timeout 5s /opt/kafka/bin/kafka-cluster.sh cluster-id --bootstrap-server broker:29092 >/dev/null 2>&1 && \
timeout 5s /opt/kafka/bin/kafka-metadata-quorum.sh --bootstrap-server broker:29092 describe --status >/dev/null 2>&1 && \
timeout 5s /opt/kafka/bin/kafka-configs.sh --bootstrap-server broker:29092 --entity-type users --describe >/dev/null 2>&1 && \
timeout 5s /opt/kafka/bin/kafka-acls.sh --bootstrap-server broker:29092 --list >/dev/null 2>&1"]
interval: 10s
timeout: 30s
retries: 15
start_period: 60s
labels:
- autoheal=true
- traefik.enable=true
- traefik.docker.network=traefik-public
- traefik.constraint-label=traefik-public
- traefik.tcp.services.${STACK_NAME?Variable not set}-kafka.loadbalancer.server.port=9093
- traefik.tcp.routers.${STACK_NAME?Variable not set}-kafka.rule=HostSNI(`*`)
- traefik.tcp.routers.${STACK_NAME?Variable not set}-kafka.entrypoints=kafka
# Uncomment to enable TLS passthrough (requires EXTERNAL listener to use SSL)
# - traefik.tcp.routers.${STACK_NAME?Variable not set}-kafka.tls.passthrough=true
kafka-acl-init:
image: apache/kafka:4.3.1
hostname: kafka-acl-init
depends_on:
broker:
condition: service_healthy
networks:
- boom
environment:
KAFKA_ADMIN_PASSWORD: ${KAFKA_ADMIN_PASSWORD:?Set KAFKA_ADMIN_PASSWORD}
KAFKA_READONLY_PASSWORD: ${KAFKA_READONLY_PASSWORD:?Set KAFKA_READONLY_PASSWORD}
volumes:
- ./scripts/init_kafka_acls.sh:/init_kafka_acls.sh:ro
entrypoint: ["bash","/init_kafka_acls.sh"]
restart: on-failure
deploy:
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
kafka-exporter:
image: danielqsj/kafka-exporter:v1.9.0
hostname: kafka-exporter
depends_on:
broker:
condition: service_healthy
networks:
- boom
command:
- --kafka.server=broker:29092
restart: always
api:
image: ${BOOM_IMAGE:-ghcr.io/boom-astro/boom:latest}
pull_policy: ${BOOM_PULL_POLICY:-build}
hostname: api
build:
context: .
dockerfile: Dockerfile
args:
# Compiled in, and recorded on every data mutation, so the ledger names
# the commit a change came from instead of "unknown".
BOOM_GIT_SHA: ${BOOM_GIT_SHA:-}
command:
- /app/boom-api
environment:
# Required secrets - must be set in environment
BOOM_DATABASE__PASSWORD: ${BOOM_DATABASE__PASSWORD:?BOOM_DATABASE__PASSWORD must be set}
BOOM_CUTOUTS_STORAGE__PASSWORD: ${BOOM_DATABASE__PASSWORD:?BOOM_DATABASE__PASSWORD must be set}
BOOM_API__AUTH__SECRET_KEY: ${BOOM_API__AUTH__SECRET_KEY:?BOOM_API__AUTH__SECRET_KEY must be set}
BOOM_API__AUTH__ADMIN_PASSWORD: ${BOOM_API__AUTH__ADMIN_PASSWORD:?BOOM_API__AUTH__ADMIN_PASSWORD must be set}
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector:4317
# Optional overrides (these have defaults in config.yaml)
BOOM_API__PORT: ${BOOM_API__PORT:-4000}
BOOM_API__AUTH__ADMIN_EMAIL: ${BOOM_API__AUTH__ADMIN_EMAIL:-}
BOOM_DATABASE__HOST: mongo
BOOM_DATABASE__USERNAME: ${BOOM_DATABASE__USERNAME:-mongoadmin}
BOOM_CUTOUTS_STORAGE__USERNAME: ${BOOM_DATABASE__USERNAME:-mongoadmin}
BOOM_CUTOUTS_STORAGE__TYPE: mongo
BOOM_CUTOUTS_STORAGE__HOST: mongo
BOOM_BABAMUL__ENABLED: ${BOOM_BABAMUL__ENABLED:-false}
# Milvus vector database (optional; see docs/milvus.md).
# Reached over the public internet, so this works regardless of where
# BOOM itself is deployed.
BOOM_MILVUS__READ_EMBEDDINGS: ${BOOM_MILVUS__READ_EMBEDDINGS:-}
BOOM_MILVUS__HOST: ${BOOM_MILVUS__HOST:-milvus.nrp-nautilus.io}
BOOM_MILVUS__PORT: ${BOOM_MILVUS__PORT:-50051}
BOOM_MILVUS__USERNAME: ${BOOM_MILVUS__USERNAME:-}
BOOM_MILVUS__PASSWORD: ${BOOM_MILVUS__PASSWORD:-}
BOOM_MILVUS__DATABASE: ${BOOM_MILVUS__DATABASE:-}
BOOM_BABAMUL__WEBAPP_URL: ${BOOM_BABAMUL__WEBAPP_URL:-}
# Base URL of the TEMPO inference service; blank means tempo-inference below.
TEMPO_SERVICE_URL: ${TEMPO_SERVICE_URL:-}
# Whether the API will create accounts. Pair it with VITE_PRERELEASE_MODE
# below, which only decides what the web app offers.
BOOM_BABAMUL__REGISTRATION_ENABLED: ${BOOM_BABAMUL__REGISTRATION_ENABLED:-true}
# Social sign-in. Secrets come from the environment only; a provider with
# no client ID/secret pair stays off.
BOOM_BABAMUL__OAUTH__REDIRECT_BASE_URL: ${BOOM_BABAMUL__OAUTH__REDIRECT_BASE_URL:-}
BOOM_BABAMUL__OAUTH__GOOGLE__CLIENT_ID: ${BOOM_BABAMUL__OAUTH__GOOGLE__CLIENT_ID:-}
BOOM_BABAMUL__OAUTH__GOOGLE__CLIENT_SECRET: ${BOOM_BABAMUL__OAUTH__GOOGLE__CLIENT_SECRET:-}
BOOM_BABAMUL__OAUTH__GITHUB__CLIENT_ID: ${BOOM_BABAMUL__OAUTH__GITHUB__CLIENT_ID:-}
BOOM_BABAMUL__OAUTH__GITHUB__CLIENT_SECRET: ${BOOM_BABAMUL__OAUTH__GITHUB__CLIENT_SECRET:-}
BOOM_BABAMUL__OAUTH__ORCID__CLIENT_ID: ${BOOM_BABAMUL__OAUTH__ORCID__CLIENT_ID:-}
BOOM_BABAMUL__OAUTH__ORCID__CLIENT_SECRET: ${BOOM_BABAMUL__OAUTH__ORCID__CLIENT_SECRET:-}
BOOM_BABAMUL__OAUTH__ORCID_SANDBOX: ${BOOM_BABAMUL__OAUTH__ORCID_SANDBOX:-false}
# Comma-separated emails of the admins: user management, data-mutating tasks.
BOOM_BABAMUL__ADMIN_EMAILS: ${BOOM_BABAMUL__ADMIN_EMAILS:-}
# Server-side PostHog analytics; blank disables analytics.
BOOM_POSTHOG__PROJECT_API_KEY: ${BOOM_POSTHOG__PROJECT_API_KEY:-}
BOOM_POSTHOG__HOST: ${BOOM_POSTHOG__HOST:-https://us.i.posthog.com}
# SMTP config for email notifications
SMTP_SERVER: ${SMTP_SERVER:-}
SMTP_PORT: ${SMTP_PORT:-}
SMTP_USERNAME: ${SMTP_USERNAME:-}
SMTP_PASSWORD: ${SMTP_PASSWORD:-}
SMTP_FROM_ADDRESS: ${SMTP_FROM_ADDRESS:-}
networks:
- boom
- traefik-public
volumes:
- ${BOOM_CONFIG_PATH:-./config.yaml}:/app/config.yaml
deploy:
resources:
limits:
memory: 128g
restart: always
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:${BOOM_API__PORT:-4000}/"]
interval: 10s
timeout: 5s
retries: 5
# boom-api does all of its init before it binds the port -- mongo connect,
# auth setup, and a cutout storage client per survey (see src/bin/api.rs)
# -- so nothing answers `/` until that finishes. With a 20s start_period
# the container was declared unhealthy ~70s in (20s + 5 x 10s), which is
# a routine cold start when mongo is restarting alongside it, and the
# api-down alert then paged 3m later. Docker ends the start period at the
# first successful check, so a generous value costs nothing on fast boots.
start_period: 180s
profiles:
- prod
- api
- dev
labels:
- traefik.enable=true
- traefik.docker.network=traefik-public
- traefik.constraint-label=traefik-public
- traefik.http.services.${STACK_NAME?Variable not set}-api.loadbalancer.server.port=4000
- traefik.http.routers.${STACK_NAME?Variable not set}-api-http.rule=Host(`api.${DOMAIN?Variable not set}`)
- traefik.http.routers.${STACK_NAME?Variable not set}-api-http.entrypoints=http
- traefik.http.routers.${STACK_NAME?Variable not set}-api-https.rule=Host(`api.${DOMAIN?Variable not set}`)
- traefik.http.routers.${STACK_NAME?Variable not set}-api-https.entrypoints=https
- traefik.http.routers.${STACK_NAME?Variable not set}-api-https.tls=true
- traefik.http.routers.${STACK_NAME?Variable not set}-api-https.tls.certresolver=le
# Define Traefik Middleware to handle domain with and without "www" to redirect to only one
- traefik.http.middlewares.${STACK_NAME?Variable not set}-www-redirect.redirectregex.regex=^http(s)?://www.(${DOMAIN?Variable not set})/(.*)
# Redirect a domain with www to non-www
- traefik.http.middlewares.${STACK_NAME?Variable not set}-www-redirect.redirectregex.replacement=http$${1}://${DOMAIN?Variable not set}/$${3}
# Compression middleware
- traefik.http.middlewares.${STACK_NAME?Variable not set}-api-compress.compress=true
# Rate limiting middleware
- traefik.http.middlewares.${STACK_NAME?Variable not set}-api-ratelimit.ratelimit.average=${BOOM_API_RATE_LIMIT_AVERAGE:-50}
- traefik.http.middlewares.${STACK_NAME?Variable not set}-api-ratelimit.ratelimit.burst=${BOOM_API_RATE_LIMIT_BURST:-200}
- traefik.http.middlewares.${STACK_NAME?Variable not set}-api-ratelimit.ratelimit.period=${BOOM_API_RATE_LIMIT_PERIOD:-1s}
# Enable www redirection for HTTP and HTTPS
- traefik.http.routers.${STACK_NAME?Variable not set}-api-http.middlewares=https-redirect,${STACK_NAME?Variable not set}-www-redirect,${STACK_NAME?Variable not set}-api-ratelimit,${STACK_NAME?Variable not set}-api-compress
- traefik.http.routers.${STACK_NAME?Variable not set}-api-https.middlewares=${STACK_NAME?Variable not set}-www-redirect,${STACK_NAME?Variable not set}-api-ratelimit,${STACK_NAME?Variable not set}-api-compress
frontend:
# Built per deployment: the VITE_* values and the nginx API origin are baked
# in at build time, so there is no generic image to pull.
image: ${BOOM_FRONTEND_IMAGE:-boom-astro/boom-frontend:local}
pull_policy: ${BOOM_FRONTEND_PULL_POLICY:-build}
hostname: frontend
build:
# Root context so the build can bundle docs/babamul.md (see frontend/Dockerfile).
context: .
dockerfile: frontend/Dockerfile
# Build the nginx production stage (port 80). Without this, Docker builds
# the last stage in the Dockerfile (`dev`, bun on 5173), which the Traefik
# labels can't reach -> 502 Bad Gateway.
target: prod
args:
BOOM_API__DOMAIN: ${BOOM_API__DOMAIN:-api.${DOMAIN?Variable not set}}
BOOM_KAFKA__DOMAIN: ${DOMAIN?Variable not set}:9093
VITE_PRERELEASE_MODE: ${VITE_PRERELEASE_MODE:-false}
VITE_PUBLIC_POSTHOG_KEY: ${VITE_PUBLIC_POSTHOG_KEY:-}
VITE_PUBLIC_POSTHOG_HOST: ${VITE_PUBLIC_POSTHOG_HOST:-}
environment:
BOOM_API__DOMAIN: ${BOOM_API__DOMAIN:-api.${DOMAIN?Variable not set}}
restart: always
networks:
- boom
- traefik-public
profiles:
- prod
- frontend
- dev
labels:
- traefik.enable=true
- traefik.docker.network=traefik-public
- traefik.constraint-label=traefik-public
- traefik.http.services.${STACK_NAME?Variable not set}-frontend.loadbalancer.server.port=80
- traefik.http.routers.${STACK_NAME?Variable not set}-frontend-http.rule=Host(`${WEBAPP_DOMAIN:-${DOMAIN?Variable not set}}`)
- traefik.http.routers.${STACK_NAME?Variable not set}-frontend-http.entrypoints=http
- traefik.http.routers.${STACK_NAME?Variable not set}-frontend-https.rule=Host(`${WEBAPP_DOMAIN:-${DOMAIN?Variable not set}}`)
- traefik.http.routers.${STACK_NAME?Variable not set}-frontend-https.entrypoints=https
- traefik.http.routers.${STACK_NAME?Variable not set}-frontend-https.tls=true
- traefik.http.routers.${STACK_NAME?Variable not set}-frontend-https.tls.certresolver=le
- traefik.http.middlewares.${STACK_NAME?Variable not set}-frontend-compress.compress=true
- traefik.http.routers.${STACK_NAME?Variable not set}-frontend-http.middlewares=https-redirect,${STACK_NAME?Variable not set}-frontend-compress
- traefik.http.routers.${STACK_NAME?Variable not set}-frontend-https.middlewares=${STACK_NAME?Variable not set}-frontend-compress
# On-demand TEMPO classification for the API's classify route. Distinct from
# `tempo` below, which is Grafana Tempo (tracing). See services/tempo/README.md.
tempo-inference:
image: ${TEMPO_INFERENCE_IMAGE:-boom-astro/tempo-inference:local}
pull_policy: ${TEMPO_INFERENCE_PULL_POLICY:-build}
hostname: tempo-inference
build:
# Repo root, so the image can copy the bundle from data/models/tempo.
context: .
dockerfile: services/tempo/Dockerfile
environment:
TEMPO_BUNDLE_DIR: /models/tempo
networks:
- boom
restart: always
healthcheck:
# Unhealthy until a bundle is loaded; the API reports 503 meanwhile.
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8500/health')"]
interval: 30s
timeout: 5s
retries: 3
start_period: 60s
profiles:
- prod
- api
- dev
consumer-ztf-public:
# Note: separate consumers for each ZTF program ID to allow independent scaling and isolation of processing
# (there appears to be an issue when one consumer reads from multiple topics, i.e. one group id with multiple topics)
# TODO: investigate further and consider merging into single consumer with multiple topics if the issue is resolved
image: ${BOOM_IMAGE:-ghcr.io/boom-astro/boom:latest}
pull_policy: ${BOOM_PULL_POLICY:-build}
hostname: consumer-ztf-public
restart: always
build:
context: .
dockerfile: Dockerfile
args:
# Compiled in, and recorded on every data mutation, so the ledger names
# the commit a change came from instead of "unknown".
BOOM_GIT_SHA: ${BOOM_GIT_SHA:-}
environment:
# Required secrets - must be set in environment
BOOM_DATABASE__PASSWORD: ${BOOM_DATABASE__PASSWORD:?BOOM_DATABASE__PASSWORD must be set}
BOOM_CUTOUTS_STORAGE__PASSWORD: ${BOOM_DATABASE__PASSWORD:?BOOM_DATABASE__PASSWORD must be set}
BOOM_API__AUTH__SECRET_KEY: ${BOOM_API__AUTH__SECRET_KEY:?BOOM_API__AUTH__SECRET_KEY must be set}
BOOM_API__AUTH__ADMIN_PASSWORD: ${BOOM_API__AUTH__ADMIN_PASSWORD:?BOOM_API__AUTH__ADMIN_PASSWORD must be set}
BOOM_KAFKA__CONSUMER__ZTF__SERVER: ${BOOM_KAFKA__CONSUMER__ZTF__SERVER:?BOOM_KAFKA__CONSUMER__ZTF__SERVER must be set}
BOOM_KAFKA__CONSUMER__ZTF__GROUP_ID: ${BOOM_KAFKA__CONSUMER__ZTF__GROUP_ID:?BOOM_KAFKA__CONSUMER__ZTF__GROUP_ID must be set}-public
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector:4317
# Optional overrides
BOOM_KAFKA__CONSUMER__ZTF__SECURITY_PROTOCOL: ${BOOM_KAFKA__CONSUMER__ZTF__SECURITY_PROTOCOL:-}
BOOM_KAFKA__CONSUMER__ZTF__USERNAME: ${BOOM_KAFKA__CONSUMER__ZTF__USERNAME:-}
BOOM_KAFKA__CONSUMER__ZTF__PASSWORD: ${BOOM_KAFKA__CONSUMER__ZTF__PASSWORD:-}
BOOM_KAFKA__CONSUMER__ZTF__SSL_CA_LOCATION: ${BOOM_KAFKA__CONSUMER__ZTF__SSL_CA_LOCATION:-}
BOOM_DATABASE__HOST: mongo
BOOM_DATABASE__USERNAME: ${BOOM_DATABASE__USERNAME:-mongoadmin}
BOOM_CUTOUTS_STORAGE__USERNAME: ${BOOM_DATABASE__USERNAME:-mongoadmin}
BOOM_CUTOUTS_STORAGE__TYPE: mongo
BOOM_CUTOUTS_STORAGE__HOST: mongo
BOOM_REDIS__HOST: valkey
networks:
- boom
profiles:
- prod
volumes:
- ${BOOM_CONFIG_PATH:-./config.yaml}:/app/config.yaml
command:
- /app/kafka_consumer
- ztf
- --programids
- public
consumer-ztf-partnership:
image: ${BOOM_IMAGE:-ghcr.io/boom-astro/boom:latest}
pull_policy: ${BOOM_PULL_POLICY:-build}
hostname: consumer-ztf-partnership
restart: always
build:
context: .
dockerfile: Dockerfile
args:
# Compiled in, and recorded on every data mutation, so the ledger names
# the commit a change came from instead of "unknown".
BOOM_GIT_SHA: ${BOOM_GIT_SHA:-}
environment:
# Required secrets - must be set in environment
BOOM_DATABASE__PASSWORD: ${BOOM_DATABASE__PASSWORD:?BOOM_DATABASE__PASSWORD must be set}
BOOM_CUTOUTS_STORAGE__PASSWORD: ${BOOM_DATABASE__PASSWORD:?BOOM_DATABASE__PASSWORD must be set}
BOOM_API__AUTH__SECRET_KEY: ${BOOM_API__AUTH__SECRET_KEY:?BOOM_API__AUTH__SECRET_KEY must be set}
BOOM_API__AUTH__ADMIN_PASSWORD: ${BOOM_API__AUTH__ADMIN_PASSWORD:?BOOM_API__AUTH__ADMIN_PASSWORD must be set}
BOOM_KAFKA__CONSUMER__ZTF__SERVER: ${BOOM_KAFKA__CONSUMER__ZTF__SERVER:?BOOM_KAFKA__CONSUMER__ZTF__SERVER must be set}
BOOM_KAFKA__CONSUMER__ZTF__GROUP_ID: ${BOOM_KAFKA__CONSUMER__ZTF__GROUP_ID:?BOOM_KAFKA__CONSUMER__ZTF__GROUP_ID must be set}-partnership
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector:4317
# Optional overrides
BOOM_KAFKA__CONSUMER__ZTF__SECURITY_PROTOCOL: ${BOOM_KAFKA__CONSUMER__ZTF__SECURITY_PROTOCOL:-}
BOOM_KAFKA__CONSUMER__ZTF__USERNAME: ${BOOM_KAFKA__CONSUMER__ZTF__USERNAME:-}
BOOM_KAFKA__CONSUMER__ZTF__PASSWORD: ${BOOM_KAFKA__CONSUMER__ZTF__PASSWORD:-}
BOOM_KAFKA__CONSUMER__ZTF__SSL_CA_LOCATION: ${BOOM_KAFKA__CONSUMER__ZTF__SSL_CA_LOCATION:-}
BOOM_DATABASE__HOST: mongo
BOOM_DATABASE__USERNAME: ${BOOM_DATABASE__USERNAME:-mongoadmin}
BOOM_CUTOUTS_STORAGE__USERNAME: ${BOOM_DATABASE__USERNAME:-mongoadmin}
BOOM_CUTOUTS_STORAGE__TYPE: mongo
BOOM_CUTOUTS_STORAGE__HOST: mongo
BOOM_REDIS__HOST: valkey
networks:
- boom
profiles:
- prod
volumes:
- ${BOOM_CONFIG_PATH:-./config.yaml}:/app/config.yaml
command:
- /app/kafka_consumer
- ztf
- --programids
- partnership
consumer-ztf-caltech:
image: ${BOOM_IMAGE:-ghcr.io/boom-astro/boom:latest}
pull_policy: ${BOOM_PULL_POLICY:-build}
hostname: consumer-ztf-caltech
restart: always
build:
context: .
dockerfile: Dockerfile
args:
# Compiled in, and recorded on every data mutation, so the ledger names
# the commit a change came from instead of "unknown".
BOOM_GIT_SHA: ${BOOM_GIT_SHA:-}
environment:
# Required secrets - must be set in environment
BOOM_DATABASE__PASSWORD: ${BOOM_DATABASE__PASSWORD:?BOOM_DATABASE__PASSWORD must be set}
BOOM_CUTOUTS_STORAGE__PASSWORD: ${BOOM_DATABASE__PASSWORD:?BOOM_DATABASE__PASSWORD must be set}
BOOM_API__AUTH__SECRET_KEY: ${BOOM_API__AUTH__SECRET_KEY:?BOOM_API__AUTH__SECRET_KEY must be set}
BOOM_API__AUTH__ADMIN_PASSWORD: ${BOOM_API__AUTH__ADMIN_PASSWORD:?BOOM_API__AUTH__ADMIN_PASSWORD must be set}
BOOM_KAFKA__CONSUMER__ZTF__SERVER: ${BOOM_KAFKA__CONSUMER__ZTF__SERVER:?BOOM_KAFKA__CONSUMER__ZTF__SERVER must be set}
BOOM_KAFKA__CONSUMER__ZTF__GROUP_ID: ${BOOM_KAFKA__CONSUMER__ZTF__GROUP_ID:?BOOM_KAFKA__CONSUMER__ZTF__GROUP_ID must be set}-caltech
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector:4317
# Optional overrides
BOOM_KAFKA__CONSUMER__ZTF__SECURITY_PROTOCOL: ${BOOM_KAFKA__CONSUMER__ZTF__SECURITY_PROTOCOL:-}
BOOM_KAFKA__CONSUMER__ZTF__USERNAME: ${BOOM_KAFKA__CONSUMER__ZTF__USERNAME:-}
BOOM_KAFKA__CONSUMER__ZTF__PASSWORD: ${BOOM_KAFKA__CONSUMER__ZTF__PASSWORD:-}
BOOM_KAFKA__CONSUMER__ZTF__SSL_CA_LOCATION: ${BOOM_KAFKA__CONSUMER__ZTF__SSL_CA_LOCATION:-}
BOOM_DATABASE__HOST: mongo
BOOM_DATABASE__USERNAME: ${BOOM_DATABASE__USERNAME:-mongoadmin}
BOOM_CUTOUTS_STORAGE__USERNAME: ${BOOM_DATABASE__USERNAME:-mongoadmin}
BOOM_CUTOUTS_STORAGE__TYPE: mongo
BOOM_CUTOUTS_STORAGE__HOST: mongo
BOOM_REDIS__HOST: valkey
networks:
- boom
profiles:
- prod
volumes:
- ${BOOM_CONFIG_PATH:-./config.yaml}:/app/config.yaml
command:
- /app/kafka_consumer
- ztf
- --programids
- caltech
consumer-lsst:
image: ${BOOM_IMAGE:-ghcr.io/boom-astro/boom:latest}
pull_policy: ${BOOM_PULL_POLICY:-build}
hostname: consumer-lsst
restart: always
build:
context: .
dockerfile: Dockerfile
args:
# Compiled in, and recorded on every data mutation, so the ledger names
# the commit a change came from instead of "unknown".
BOOM_GIT_SHA: ${BOOM_GIT_SHA:-}
environment:
# Required secrets - must be set in environment
BOOM_DATABASE__PASSWORD: ${BOOM_DATABASE__PASSWORD:?BOOM_DATABASE__PASSWORD must be set}
BOOM_CUTOUTS_STORAGE__PASSWORD: ${BOOM_DATABASE__PASSWORD:?BOOM_DATABASE__PASSWORD must be set}
BOOM_API__AUTH__SECRET_KEY: ${BOOM_API__AUTH__SECRET_KEY:?BOOM_API__AUTH__SECRET_KEY must be set}
BOOM_API__AUTH__ADMIN_PASSWORD: ${BOOM_API__AUTH__ADMIN_PASSWORD:?BOOM_API__AUTH__ADMIN_PASSWORD must be set}
BOOM_KAFKA__CONSUMER__LSST__GROUP_ID: ${BOOM_KAFKA__CONSUMER__LSST__GROUP_ID:?BOOM_KAFKA__CONSUMER__LSST__GROUP_ID must be set}
BOOM_KAFKA__CONSUMER__LSST__USERNAME: ${BOOM_KAFKA__CONSUMER__LSST__USERNAME:?BOOM_KAFKA__CONSUMER__LSST__USERNAME must be set}
BOOM_KAFKA__CONSUMER__LSST__PASSWORD: ${BOOM_KAFKA__CONSUMER__LSST__PASSWORD:?BOOM_KAFKA__CONSUMER__LSST__PASSWORD must be set}
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector:4317
# Optional overrides
BOOM_DATABASE__HOST: mongo
BOOM_DATABASE__USERNAME: ${BOOM_DATABASE__USERNAME:-mongoadmin}
BOOM_CUTOUTS_STORAGE__USERNAME: ${BOOM_DATABASE__USERNAME:-mongoadmin}
BOOM_CUTOUTS_STORAGE__TYPE: mongo
BOOM_CUTOUTS_STORAGE__HOST: mongo
BOOM_REDIS__HOST: valkey
networks:
- boom
profiles:
- prod
volumes:
- ${BOOM_CONFIG_PATH:-./config.yaml}:/app/config.yaml
command:
- /app/kafka_consumer
- lsst
consumer-winter:
image: ${BOOM_IMAGE:-ghcr.io/boom-astro/boom:latest}
pull_policy: ${BOOM_PULL_POLICY:-build}
hostname: consumer-winter
restart: always
build:
context: .
dockerfile: Dockerfile
args:
# Compiled in, and recorded on every data mutation, so the ledger names
# the commit a change came from instead of "unknown".
BOOM_GIT_SHA: ${BOOM_GIT_SHA:-}
environment:
# Required secrets - must be set in environment
BOOM_DATABASE__PASSWORD: ${BOOM_DATABASE__PASSWORD:?BOOM_DATABASE__PASSWORD must be set}
BOOM_CUTOUTS_STORAGE__PASSWORD: ${BOOM_DATABASE__PASSWORD:?BOOM_DATABASE__PASSWORD must be set}
BOOM_API__AUTH__SECRET_KEY: ${BOOM_API__AUTH__SECRET_KEY:?BOOM_API__AUTH__SECRET_KEY must be set}
BOOM_API__AUTH__ADMIN_PASSWORD: ${BOOM_API__AUTH__ADMIN_PASSWORD:?BOOM_API__AUTH__ADMIN_PASSWORD must be set}
# WINTER's Kafka stream is unauthenticated (no SASL), so only the broker
# address and consumer group id are required (cf. the LSST consumer).
BOOM_KAFKA__CONSUMER__WINTER__SERVER: ${BOOM_KAFKA__CONSUMER__WINTER__SERVER:?BOOM_KAFKA__CONSUMER__WINTER__SERVER must be set}
BOOM_KAFKA__CONSUMER__WINTER__GROUP_ID: ${BOOM_KAFKA__CONSUMER__WINTER__GROUP_ID:?BOOM_KAFKA__CONSUMER__WINTER__GROUP_ID must be set}
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector:4317
# Optional overrides
BOOM_DATABASE__HOST: mongo
BOOM_DATABASE__USERNAME: ${BOOM_DATABASE__USERNAME:-mongoadmin}
BOOM_CUTOUTS_STORAGE__USERNAME: ${BOOM_DATABASE__USERNAME:-mongoadmin}
BOOM_CUTOUTS_STORAGE__TYPE: mongo
BOOM_CUTOUTS_STORAGE__HOST: mongo
BOOM_REDIS__HOST: valkey
networks:
- boom
profiles:
- prod
volumes:
- ${BOOM_CONFIG_PATH:-./config.yaml}:/app/config.yaml
command:
- /app/kafka_consumer
- winter
consumer-decam:
image: ${BOOM_IMAGE:-ghcr.io/boom-astro/boom:latest}
pull_policy: ${BOOM_PULL_POLICY:-build}
hostname: consumer-decam
restart: always
build:
context: .
dockerfile: Dockerfile
environment:
BOOM_DATABASE__PASSWORD: ${BOOM_DATABASE__PASSWORD:?BOOM_DATABASE__PASSWORD must be set}
BOOM_CUTOUTS_STORAGE__PASSWORD: ${BOOM_DATABASE__PASSWORD:?BOOM_DATABASE__PASSWORD must be set}
BOOM_API__AUTH__SECRET_KEY: ${BOOM_API__AUTH__SECRET_KEY:?BOOM_API__AUTH__SECRET_KEY must be set}
BOOM_API__AUTH__ADMIN_PASSWORD: ${BOOM_API__AUTH__ADMIN_PASSWORD:?BOOM_API__AUTH__ADMIN_PASSWORD must be set}
BOOM_KAFKA__CONSUMER__DECAM__SERVER: ${BOOM_KAFKA__CONSUMER__DECAM__SERVER:-}
BOOM_KAFKA__CONSUMER__DECAM__GROUP_ID: ${BOOM_KAFKA__CONSUMER__DECAM__GROUP_ID:-}
BOOM_KAFKA__CONSUMER__DECAM__SECURITY_PROTOCOL: ${BOOM_KAFKA__CONSUMER__DECAM__SECURITY_PROTOCOL:-}
BOOM_KAFKA__CONSUMER__DECAM__USERNAME: ${BOOM_KAFKA__CONSUMER__DECAM__USERNAME:-}
BOOM_KAFKA__CONSUMER__DECAM__PASSWORD: ${BOOM_KAFKA__CONSUMER__DECAM__PASSWORD:-}
BOOM_KAFKA__CONSUMER__DECAM__SSL_CA_LOCATION: ${BOOM_KAFKA__CONSUMER__DECAM__SSL_CA_FILE:+/app/decam-ca.crt}
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector:4317
BOOM_DATABASE__HOST: mongo
BOOM_DATABASE__USERNAME: ${BOOM_DATABASE__USERNAME:-mongoadmin}
BOOM_CUTOUTS_STORAGE__USERNAME: ${BOOM_DATABASE__USERNAME:-mongoadmin}
BOOM_CUTOUTS_STORAGE__TYPE: mongo
BOOM_CUTOUTS_STORAGE__HOST: mongo
BOOM_REDIS__HOST: valkey
networks:
- boom
profiles:
- decam
volumes:
- ${BOOM_CONFIG_PATH:-./config.yaml}:/app/config.yaml
- ${BOOM_KAFKA__CONSUMER__DECAM__SSL_CA_FILE:-/dev/null}:/app/decam-ca.crt:ro
command:
- /app/kafka_consumer
- decam
# Runs queued tasks: catalog ingests, data migrations and reprocessing jobs.
# Separate from the api service on purpose: these run for hours and are
# memory-hungry, and an API restart or deploy must not kill one. A run
# interrupted by a deploy goes back on the queue and the replacement worker
# resumes it.
task-worker:
image: ${BOOM_IMAGE:-ghcr.io/boom-astro/boom:latest}
pull_policy: ${BOOM_PULL_POLICY:-build}
hostname: task-worker
restart: always
build:
context: .
dockerfile: Dockerfile
args:
# Compiled in, and recorded on every data mutation, so the ledger names
# the commit a change came from instead of "unknown".
BOOM_GIT_SHA: ${BOOM_GIT_SHA:-}
environment:
# Required secrets - must be set in environment
BOOM_DATABASE__PASSWORD: ${BOOM_DATABASE__PASSWORD:?BOOM_DATABASE__PASSWORD must be set}
BOOM_CUTOUTS_STORAGE__PASSWORD: ${BOOM_DATABASE__PASSWORD:?BOOM_DATABASE__PASSWORD must be set}
BOOM_API__AUTH__SECRET_KEY: ${BOOM_API__AUTH__SECRET_KEY:?BOOM_API__AUTH__SECRET_KEY must be set}
BOOM_API__AUTH__ADMIN_PASSWORD: ${BOOM_API__AUTH__ADMIN_PASSWORD:?BOOM_API__AUTH__ADMIN_PASSWORD must be set}
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector:4317
# Optional overrides
BOOM_DATABASE__HOST: mongo
BOOM_DATABASE__USERNAME: ${BOOM_DATABASE__USERNAME:-mongoadmin}
BOOM_CUTOUTS_STORAGE__USERNAME: ${BOOM_DATABASE__USERNAME:-mongoadmin}
BOOM_CUTOUTS_STORAGE__TYPE: mongo
BOOM_CUTOUTS_STORAGE__HOST: mongo
# The migration and reprocessing tasks drive their work through Valkey.
BOOM_REDIS__HOST: valkey
BOOM_CATALOG_DATA_PATH: /app/data/catalogs
BOOM_REGALADE_URL: ${BOOM_REGALADE_URL:-}
# Pan-STARRS is in a requester-pays bucket, so fetching it is billed to
# whoever asks and needs credentials that can pay. Prefixed, and renamed
# to the plain AWS_* names on boompy's environment alone: those are the
# default credential chain, so setting them here would make a key meant
# for one catalog the default for this process and everything it spawns.
# Left empty for deployments that do not ingest it: an empty value is
# unset, and only that one catalog refuses to start without them. On AWS,
# leave these unset and give the instance a role instead -- boto finds
# that on its own.
BOOM_PANSTARRS_AWS_ACCESS_KEY_ID: ${BOOM_PANSTARRS_AWS_ACCESS_KEY_ID:-}
BOOM_PANSTARRS_AWS_SECRET_ACCESS_KEY: ${BOOM_PANSTARRS_AWS_SECRET_ACCESS_KEY:-}
BOOM_PANSTARRS_AWS_SESSION_TOKEN: ${BOOM_PANSTARRS_AWS_SESSION_TOKEN:-}
BOOM_PANSTARRS_AWS_DEFAULT_REGION: ${BOOM_PANSTARRS_AWS_DEFAULT_REGION:-us-east-1}
BOOM_TNS__BOT_ID: ${BOOM_TNS__BOT_ID:-}
BOOM_TNS__BOT_NAME: ${BOOM_TNS__BOT_NAME:-}
BOOM_TNS__API_KEY: ${BOOM_TNS__API_KEY:-}
networks:
- boom
profiles:
- prod
volumes:
- ${BOOM_CONFIG_PATH:-./config.yaml}:/app/config.yaml
- catalog_data:/app/data/catalogs
# enrich_reprocess builds a real enrichment worker, which loads every
# model in ZTF_MODELS and hashes it for the enrichment set stamp. Without
# these the task fails at startup rather than part way through.
- ${PWD}/data/models:/app/data/models:ro
- ${PWD}/data/ls_footprint_moc.fits:/app/data/ls_footprint_moc.fits:ro
command:
- /app/task_worker
scheduler-ztf:
image: ${BOOM_IMAGE:-ghcr.io/boom-astro/boom:latest}
pull_policy: ${BOOM_PULL_POLICY:-build}
hostname: scheduler-ztf
restart: always
build:
context: .
dockerfile: Dockerfile
args:
# Compiled in, and recorded on every data mutation, so the ledger names
# the commit a change came from instead of "unknown".
BOOM_GIT_SHA: ${BOOM_GIT_SHA:-}
environment:
# Required secrets - must be set in environment
BOOM_DATABASE__PASSWORD: ${BOOM_DATABASE__PASSWORD:?BOOM_DATABASE__PASSWORD must be set}
BOOM_CUTOUTS_STORAGE__PASSWORD: ${BOOM_DATABASE__PASSWORD:?BOOM_DATABASE__PASSWORD must be set}
BOOM_API__AUTH__SECRET_KEY: ${BOOM_API__AUTH__SECRET_KEY:?BOOM_API__AUTH__SECRET_KEY must be set}
BOOM_API__AUTH__ADMIN_PASSWORD: ${BOOM_API__AUTH__ADMIN_PASSWORD:?BOOM_API__AUTH__ADMIN_PASSWORD must be set}
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector:4317
# Optional overrides
BOOM_DATABASE__HOST: mongo
BOOM_DATABASE__USERNAME: ${BOOM_DATABASE__USERNAME:-mongoadmin}
BOOM_CUTOUTS_STORAGE__USERNAME: ${BOOM_DATABASE__USERNAME:-mongoadmin}
BOOM_CUTOUTS_STORAGE__TYPE: mongo
BOOM_CUTOUTS_STORAGE__HOST: mongo
BOOM_BABAMUL__ENABLED: ${BOOM_BABAMUL__ENABLED:-false}
BOOM_REDIS__HOST: valkey
BOOM_GPU__ENABLED: ${BOOM_GPU__ENABLED:-false}
BOOM_GPU__DEVICE_IDS: ${BOOM_GPU__DEVICE_IDS:-}
# Milvus vector database (optional; see docs/milvus.md).
# This scheduler runs the AppleCiDEr fusion model, so it is what produces the
# embeddings. Reached over the public internet, so this works regardless
# of where BOOM itself is deployed.
BOOM_MILVUS__WRITE_EMBEDDINGS: ${BOOM_MILVUS__WRITE_EMBEDDINGS:-}
BOOM_MILVUS__HOST: ${BOOM_MILVUS__HOST:-milvus.nrp-nautilus.io}
BOOM_MILVUS__PORT: ${BOOM_MILVUS__PORT:-50051}
BOOM_MILVUS__USERNAME: ${BOOM_MILVUS__USERNAME:-}
BOOM_MILVUS__PASSWORD: ${BOOM_MILVUS__PASSWORD:-}
BOOM_MILVUS__DATABASE: ${BOOM_MILVUS__DATABASE:-}
networks:
- boom
profiles:
- prod
volumes:
- ${BOOM_CONFIG_PATH:-./config.yaml}:/app/config.yaml
- ${PWD}/data/models:/app/data/models:ro
- ${PWD}/data/ls_footprint_moc.fits:/app/data/ls_footprint_moc.fits:ro
command:
- /app/scheduler
- ztf
scheduler-lsst:
image: ${BOOM_IMAGE:-ghcr.io/boom-astro/boom:latest}
pull_policy: ${BOOM_PULL_POLICY:-build}
hostname: scheduler-lsst
restart: always
build:
context: .
dockerfile: Dockerfile
args:
# Compiled in, and recorded on every data mutation, so the ledger names
# the commit a change came from instead of "unknown".
BOOM_GIT_SHA: ${BOOM_GIT_SHA:-}
environment:
# Required secrets - must be set in environment
BOOM_DATABASE__PASSWORD: ${BOOM_DATABASE__PASSWORD:?BOOM_DATABASE__PASSWORD must be set}
BOOM_CUTOUTS_STORAGE__PASSWORD: ${BOOM_DATABASE__PASSWORD:?BOOM_DATABASE__PASSWORD must be set}
BOOM_API__AUTH__SECRET_KEY: ${BOOM_API__AUTH__SECRET_KEY:?BOOM_API__AUTH__SECRET_KEY must be set}
BOOM_API__AUTH__ADMIN_PASSWORD: ${BOOM_API__AUTH__ADMIN_PASSWORD:?BOOM_API__AUTH__ADMIN_PASSWORD must be set}
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector:4317
# Optional overrides
BOOM_DATABASE__HOST: mongo
BOOM_DATABASE__USERNAME: ${BOOM_DATABASE__USERNAME:-mongoadmin}
BOOM_CUTOUTS_STORAGE__USERNAME: ${BOOM_DATABASE__USERNAME:-mongoadmin}
BOOM_CUTOUTS_STORAGE__TYPE: mongo
BOOM_CUTOUTS_STORAGE__HOST: mongo
BOOM_BABAMUL__ENABLED: ${BOOM_BABAMUL__ENABLED:-false}
BOOM_REDIS__HOST: valkey
BOOM_GPU__ENABLED: ${BOOM_GPU__ENABLED:-false}
BOOM_GPU__DEVICE_IDS: ${BOOM_GPU__DEVICE_IDS:-}
networks:
- boom
profiles:
- prod
volumes:
- ${BOOM_CONFIG_PATH:-./config.yaml}:/app/config.yaml
- ${PWD}/data/models:/app/data/models:ro
- ${PWD}/data/ls_footprint_moc.fits:/app/data/ls_footprint_moc.fits:ro
command:
- /app/scheduler
- lsst
scheduler-winter:
image: ${BOOM_IMAGE:-ghcr.io/boom-astro/boom:latest}
pull_policy: ${BOOM_PULL_POLICY:-build}
hostname: scheduler-winter
restart: always
build:
context: .
dockerfile: Dockerfile
args:
# Compiled in, and recorded on every data mutation, so the ledger names
# the commit a change came from instead of "unknown".
BOOM_GIT_SHA: ${BOOM_GIT_SHA:-}
environment:
# Required secrets - must be set in environment
BOOM_DATABASE__PASSWORD: ${BOOM_DATABASE__PASSWORD:?BOOM_DATABASE__PASSWORD must be set}
BOOM_CUTOUTS_STORAGE__PASSWORD: ${BOOM_DATABASE__PASSWORD:?BOOM_DATABASE__PASSWORD must be set}
BOOM_API__AUTH__SECRET_KEY: ${BOOM_API__AUTH__SECRET_KEY:?BOOM_API__AUTH__SECRET_KEY must be set}
BOOM_API__AUTH__ADMIN_PASSWORD: ${BOOM_API__AUTH__ADMIN_PASSWORD:?BOOM_API__AUTH__ADMIN_PASSWORD must be set}
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector:4317
# Optional overrides
BOOM_DATABASE__HOST: mongo
BOOM_DATABASE__USERNAME: ${BOOM_DATABASE__USERNAME:-mongoadmin}
BOOM_CUTOUTS_STORAGE__USERNAME: ${BOOM_DATABASE__USERNAME:-mongoadmin}
BOOM_CUTOUTS_STORAGE__TYPE: mongo
BOOM_CUTOUTS_STORAGE__HOST: mongo
BOOM_REDIS__HOST: valkey
networks:
- boom
profiles:
- prod
# Unlike the ZTF/LSST schedulers, the WINTER scheduler runs no ML enrichment,
# so it mounts neither data/models nor the LSST footprint MOC.
volumes:
- ${BOOM_CONFIG_PATH:-./config.yaml}:/app/config.yaml
command:
- /app/scheduler
- winter
# MPC_orbits is refreshed by the ZTF scheduler on its own, and on demand by
# the `mpcorb_ingest` task -- see docs/task-system.md. The one-shot service
# that used to live here ran a binary that no longer exists.
scheduler-decam:
image: ${BOOM_IMAGE:-ghcr.io/boom-astro/boom:latest}
pull_policy: ${BOOM_PULL_POLICY:-build}
hostname: scheduler-decam
restart: always
build:
context: .
dockerfile: Dockerfile
environment:
BOOM_DATABASE__PASSWORD: ${BOOM_DATABASE__PASSWORD:?BOOM_DATABASE__PASSWORD must be set}
BOOM_CUTOUTS_STORAGE__PASSWORD: ${BOOM_DATABASE__PASSWORD:?BOOM_DATABASE__PASSWORD must be set}
BOOM_API__AUTH__SECRET_KEY: ${BOOM_API__AUTH__SECRET_KEY:?BOOM_API__AUTH__SECRET_KEY must be set}
BOOM_API__AUTH__ADMIN_PASSWORD: ${BOOM_API__AUTH__ADMIN_PASSWORD:?BOOM_API__AUTH__ADMIN_PASSWORD must be set}
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector:4317
BOOM_DATABASE__HOST: mongo
BOOM_DATABASE__USERNAME: ${BOOM_DATABASE__USERNAME:-mongoadmin}
BOOM_CUTOUTS_STORAGE__USERNAME: ${BOOM_DATABASE__USERNAME:-mongoadmin}
BOOM_CUTOUTS_STORAGE__TYPE: mongo
BOOM_CUTOUTS_STORAGE__HOST: mongo
BOOM_REDIS__HOST: valkey
networks:
- boom
profiles:
- decam
volumes:
- ${BOOM_CONFIG_PATH:-./config.yaml}:/app/config.yaml
command:
- /app/scheduler
- decam
scheduler-askap:
image: ${BOOM_IMAGE:-ghcr.io/boom-astro/boom:latest}
pull_policy: ${BOOM_PULL_POLICY:-build}
hostname: scheduler-askap
restart: always
build:
context: .
dockerfile: Dockerfile
args:
BOOM_GIT_SHA: ${BOOM_GIT_SHA:-}
environment:
BOOM_DATABASE__PASSWORD: ${BOOM_DATABASE__PASSWORD:?BOOM_DATABASE__PASSWORD must be set}
BOOM_CUTOUTS_STORAGE__PASSWORD: ${BOOM_DATABASE__PASSWORD:?BOOM_DATABASE__PASSWORD must be set}
BOOM_API__AUTH__SECRET_KEY: ${BOOM_API__AUTH__SECRET_KEY:?BOOM_API__AUTH__SECRET_KEY must be set}
BOOM_API__AUTH__ADMIN_PASSWORD: ${BOOM_API__AUTH__ADMIN_PASSWORD:?BOOM_API__AUTH__ADMIN_PASSWORD must be set}
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector:4317
BOOM_DATABASE__HOST: mongo
BOOM_DATABASE__USERNAME: ${BOOM_DATABASE__USERNAME:-mongoadmin}
BOOM_CUTOUTS_STORAGE__USERNAME: ${BOOM_DATABASE__USERNAME:-mongoadmin}
BOOM_CUTOUTS_STORAGE__TYPE: mongo
BOOM_CUTOUTS_STORAGE__HOST: mongo
BOOM_REDIS__HOST: valkey
networks:
- boom
profiles:
- prod
volumes:
- ${BOOM_CONFIG_PATH:-./config.yaml}:/app/config.yaml
command:
- /app/scheduler
- askap
# Moving-object discovery: once each ZTF night is over, links the last
# `linker.window_nights` nights of unassociated detections, stores the tracks
# in ZTF_tracks, and logs the recall on objects IPAC identified. Settings are
# in the `linker` section of the config.
linker-ztf:
image: ${BOOM_IMAGE:-ghcr.io/boom-astro/boom:latest}
pull_policy: ${BOOM_PULL_POLICY:-build}
hostname: linker-ztf
restart: always
build:
context: .
dockerfile: Dockerfile
environment:
# Required secrets - must be set in environment
BOOM_DATABASE__PASSWORD: ${BOOM_DATABASE__PASSWORD:?BOOM_DATABASE__PASSWORD must be set}
BOOM_CUTOUTS_STORAGE__PASSWORD: ${BOOM_DATABASE__PASSWORD:?BOOM_DATABASE__PASSWORD must be set}
BOOM_API__AUTH__SECRET_KEY: ${BOOM_API__AUTH__SECRET_KEY:?BOOM_API__AUTH__SECRET_KEY must be set}
BOOM_API__AUTH__ADMIN_PASSWORD: ${BOOM_API__AUTH__ADMIN_PASSWORD:?BOOM_API__AUTH__ADMIN_PASSWORD must be set}
# Optional overrides
BOOM_DATABASE__HOST: mongo
BOOM_DATABASE__USERNAME: ${BOOM_DATABASE__USERNAME:-mongoadmin}
BOOM_CUTOUTS_STORAGE__USERNAME: ${BOOM_DATABASE__USERNAME:-mongoadmin}
BOOM_CUTOUTS_STORAGE__TYPE: mongo
BOOM_CUTOUTS_STORAGE__HOST: mongo
deploy:
resources:
limits:
memory: ${BOOM_LINKER_MEM_LIMIT:-48g}
networks:
- boom
profiles:
- prod
volumes:
- ${BOOM_CONFIG_PATH:-./config.yaml}:/app/config.yaml
command:
- /app/linker
# Stores GCN events, notices and localizations (LVK, Fermi GBM, IceCube, FRBs). Exits at
# once, and stays down, without BOOM_GCN__CLIENT_ID and BOOM_GCN__CLIENT_SECRET.
gcn-consumer:
image: ${BOOM_IMAGE:-ghcr.io/boom-astro/boom:latest}
pull_policy: ${BOOM_PULL_POLICY:-build}
hostname: gcn-consumer
restart: on-failure
build:
context: .
dockerfile: Dockerfile
environment:
# Required secrets - must be set in environment
BOOM_DATABASE__PASSWORD: ${BOOM_DATABASE__PASSWORD:?BOOM_DATABASE__PASSWORD must be set}
BOOM_CUTOUTS_STORAGE__PASSWORD: ${BOOM_DATABASE__PASSWORD:?BOOM_DATABASE__PASSWORD must be set}
BOOM_API__AUTH__SECRET_KEY: ${BOOM_API__AUTH__SECRET_KEY:?BOOM_API__AUTH__SECRET_KEY must be set}
BOOM_API__AUTH__ADMIN_PASSWORD: ${BOOM_API__AUTH__ADMIN_PASSWORD:?BOOM_API__AUTH__ADMIN_PASSWORD must be set}
BOOM_GCN__CLIENT_ID: ${BOOM_GCN__CLIENT_ID:-}
BOOM_GCN__CLIENT_SECRET: ${BOOM_GCN__CLIENT_SECRET:-}
# Optional overrides
BOOM_DATABASE__HOST: mongo
BOOM_DATABASE__USERNAME: ${BOOM_DATABASE__USERNAME:-mongoadmin}
BOOM_CUTOUTS_STORAGE__USERNAME: ${BOOM_DATABASE__USERNAME:-mongoadmin}
BOOM_CUTOUTS_STORAGE__TYPE: mongo
BOOM_CUTOUTS_STORAGE__HOST: mongo
networks:
- boom
profiles:
- prod
volumes:
- ${BOOM_CONFIG_PATH:-./config.yaml}:/app/config.yaml
command:
- /app/gcn_consumer
otel-collector: # [^1]
image: otel/opentelemetry-collector:0.131.1
restart: always
volumes:
- ./config/otel-collector-config.yaml:/etc/otelcol/config.yaml
networks:
- boom
docker-socket-proxy:
image: tecnativa/docker-socket-proxy:0.3.0
hostname: docker-socket-proxy
environment:
CONTAINERS: 1
EVENTS: 0
# Promtail's Docker SD enriches each container target with its network
# info, so it needs read access to /networks. Read-only; no POST allowed.
NETWORKS: 1
PING: 1
VERSION: 1
POST: 0
TIMEOUT_CLIENT: 30s
TIMEOUT_CONNECT: 5s
TIMEOUT_SERVER: 30s
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./config/docker-socket-proxy/haproxy.cfg.template:/usr/local/etc/haproxy/haproxy.cfg.template:ro
tmpfs:
- /var/lib/haproxy
networks:
- boom
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
restart: always
cadvisor:
image: ghcr.io/google/cadvisor:0.56.2
hostname: cadvisor
volumes:
- /:/rootfs:ro
- /sys:/sys:ro
networks:
- boom
read_only: true