-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
785 lines (767 loc) · 21.8 KB
/
docker-compose.yml
File metadata and controls
785 lines (767 loc) · 21.8 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
---
x-logging: &default-logging
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
discogsography:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16
services:
# Message broker
rabbitmq:
image: rabbitmq:4-management
container_name: discogsography-rabbitmq
hostname: rabbitmq
ulimits:
nofile:
soft: 65536
hard: 65536
environment:
RABBITMQ_DEFAULT_PASS: discogsography
# Set default queue type to quorum for RabbitMQ 4.2+
RABBITMQ_DEFAULT_QUEUE_TYPE: quorum
RABBITMQ_DEFAULT_USER: discogsography
RABBITMQ_DEFAULT_VHOST: /
# Enable management stats (disabled by default in RabbitMQ 4.x) so the
# dashboard can display queue depths, publish rates, and ack rates.
# Raise max_message_size to 128 MB (default 16 MB) for large MusicBrainz
# records such as "Various Artists" that can exceed 50 MB.
RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS: >-
-rabbit log_levels [{connection,error},{default,warning}]
-rabbit max_message_size 134217728
-rabbitmq_management disable_management_stats false
ports:
- "5672:5672" # AMQP port
- "15672:15672" # Management UI
volumes:
- rabbitmq_data:/var/lib/rabbitmq
networks:
discogsography:
aliases:
- message-broker
- amqp
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
interval: 30s
timeout: 10s
retries: 5
start_period: 90s
restart: unless-stopped
logging: *default-logging
# PostgreSQL database
postgres:
image: postgres:18-alpine
container_name: discogsography-postgres
hostname: postgres
command:
- "postgres"
- "-c"
- "max_wal_size=4GB"
- "-c"
- "checkpoint_completion_target=0.9"
environment:
PGDATA: /var/lib/postgresql/data/pgdata
POSTGRES_DB: discogsography
POSTGRES_INITDB_ARGS: "--encoding=UTF8 --lc-collate=en_US.UTF-8 --lc-ctype=en_US.UTF-8"
POSTGRES_PASSWORD: discogsography
POSTGRES_USER: discogsography
ports:
- "5433:5432" # Changed from 5432 to avoid conflict
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
discogsography:
aliases:
- postgres-db
- database
healthcheck:
test: ["CMD-SHELL", "pg_isready -U discogsography -d discogsography -h localhost"]
interval: 10s
timeout: 5s
retries: 10
start_period: 45s
restart: unless-stopped
logging: *default-logging
security_opt:
- no-new-privileges:true
# Neo4j graph database
neo4j:
image: neo4j:2026-community
container_name: discogsography-neo4j
hostname: neo4j
ulimits:
nofile:
soft: 65536
hard: 65536
environment:
JAVA_TOOL_OPTIONS: '--enable-native-access=ALL-UNNAMED'
NEO4J_ACCEPT_LICENSE_AGREEMENT: 'yes'
NEO4J_apoc_export_file_enabled: 'true'
NEO4J_apoc_import_file_enabled: 'true'
NEO4J_apoc_import_file_use__neo4j__config: 'true'
NEO4J_AUTH: neo4j/discogsography
NEO4J_db_checkpoint_iops_limit: '2000'
NEO4J_db_logs_query_enabled: 'INFO'
NEO4J_db_logs_query_threshold: '10s'
NEO4J_db_transaction_timeout: '120s'
NEO4J_dbms_logs_debug_level: WARN
NEO4J_dbms_memory_transaction_total_max: 6G
NEO4J_dbms_security_procedures_unrestricted: 'apoc.*'
NEO4J_PLUGINS: '["apoc"]'
NEO4J_server_memory_heap_initial__size: 1G
NEO4J_server_memory_heap_max__size: 2G
NEO4J_server_memory_pagecache_size: 1G
ports:
- "7474:7474" # HTTP
- "7687:7687" # Bolt
volumes:
- neo4j_data:/data
- neo4j_logs:/logs
- neo4j_import:/var/lib/neo4j/import
- neo4j_plugins:/plugins
networks:
discogsography:
aliases:
- graph-db
- neo4j-db
healthcheck:
test: ["CMD", "cypher-shell", "-u", "neo4j", "-p", "discogsography", "RETURN 1 as health"]
interval: 15s
timeout: 10s
retries: 10
start_period: 60s
restart: unless-stopped
logging: *default-logging
security_opt:
- no-new-privileges:true
# Redis cache
redis:
image: redis:7-alpine
container_name: discogsography-redis
hostname: redis
command: redis-server --appendonly yes --maxmemory 512mb --maxmemory-policy allkeys-lru
ports:
- "6379:6379"
volumes:
- redis_data:/data
networks:
discogsography:
aliases:
- cache
- redis-cache
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
restart: unless-stopped
logging: *default-logging
security_opt:
- no-new-privileges:true
# Schema initializer — one-shot service that creates all Neo4j and PostgreSQL
# schema before any other service starts. Docker Compose waits for it to exit
# successfully (service_completed_successfully) before starting dependents.
schema-init:
build:
context: .
dockerfile: schema-init/Dockerfile
args:
PYTHON_VERSION: ${PYTHON_VERSION:-3.13}
UID: ${UID:-1000}
GID: ${GID:-1000}
image: discogsography/schema-init:latest
container_name: discogsography-schema-init
hostname: schema-init
user: "${UID:-1000}:${GID:-1000}"
environment:
LOG_LEVEL: INFO
NEO4J_HOST: neo4j
NEO4J_PASSWORD: discogsography
NEO4J_USERNAME: neo4j
POSTGRES_DATABASE: discogsography
POSTGRES_HOST: postgres
POSTGRES_PASSWORD: discogsography
POSTGRES_USERNAME: discogsography
PYTHONUNBUFFERED: "1"
volumes:
- schema_init_logs:/logs
depends_on:
postgres:
condition: service_healthy
neo4j:
condition: service_healthy
networks:
- discogsography
restart: "no"
logging: *default-logging
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
read_only: true
tmpfs:
- /tmp
# API service — user accounts, JWT, Discogs OAuth
api:
build:
context: .
dockerfile: api/Dockerfile
args:
PYTHON_VERSION: ${PYTHON_VERSION:-3.13}
UID: ${UID:-1000}
GID: ${GID:-1000}
image: discogsography/api:latest
container_name: discogsography-api
hostname: api
user: "${UID:-1000}:${GID:-1000}"
environment:
JWT_ALGORITHM: HS256
JWT_EXPIRE_MINUTES: "60"
# IMPORTANT: Override JWT_SECRET_KEY with a random 256-bit key in production!
JWT_SECRET_KEY: "dev-secret-change-in-production-use-a-256-bit-random-key"
LOG_LEVEL: INFO
NEO4J_HOST: neo4j
NEO4J_PASSWORD: discogsography
NEO4J_USERNAME: neo4j
POSTGRES_DATABASE: discogsography
POSTGRES_HOST: postgres
POSTGRES_PASSWORD: discogsography
POSTGRES_USERNAME: discogsography
PYTHONUNBUFFERED: "1"
RABBITMQ_HOST: rabbitmq
RABBITMQ_PASSWORD: discogsography
RABBITMQ_USERNAME: discogsography
REDIS_HOST: redis
STARTUP_DELAY: "5"
DISCOGS_DATA_ROOT: /discogs-data
MUSICBRAINZ_DATA_ROOT: /musicbrainz-data
DB_PROFILING: "${DB_PROFILING:-true}"
# NLQ (Natural Language Queries) — disabled by default
NLQ_ENABLED: "${NLQ_ENABLED:-false}"
NLQ_API_KEY: "${NLQ_API_KEY:-}"
NLQ_MODEL: "${NLQ_MODEL:-claude-sonnet-4-20250514}"
# Email notifications (optional — when not set, reset links are logged instead)
# BREVO_API_KEY: "${BREVO_API_KEY:-}"
# BREVO_SENDER_EMAIL: "${BREVO_SENDER_EMAIL:-noreply@discogsography.com}"
# BREVO_SENDER_NAME: "${BREVO_SENDER_NAME:-Discogsography}"
# Encryption master key (optional — required for TOTP 2FA, derives OAuth + TOTP keys via HKDF)
# ENCRYPTION_MASTER_KEY: "${ENCRYPTION_MASTER_KEY:-}"
ports:
- "8004:8004" # Auth API
- "8005:8005" # Health check
volumes:
- api_logs:/logs
- discogs_data:/discogs-data:ro
- musicbrainz_data:/musicbrainz-data:ro
depends_on:
schema-init:
condition: service_completed_successfully
postgres:
condition: service_healthy
redis:
condition: service_healthy
neo4j:
condition: service_healthy
networks:
- discogsography
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8005/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
restart: unless-stopped
logging: *default-logging
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
read_only: true
tmpfs:
- /tmp
# Rust-based extractor service for Discogs data
extractor-discogs:
build:
context: .
dockerfile: extractor/Dockerfile
image: discogsography/extractor:latest
container_name: discogsography-extractor-discogs
hostname: extractor-discogs
command: ["--source", "discogs"]
user: "1000:1000"
environment:
DISCOGS_ROOT: /discogs-data
FORCE_REPROCESS: "false"
LOG_LEVEL: info
PERIODIC_CHECK_DAYS: "5"
RABBITMQ_HOST: rabbitmq
RABBITMQ_PASSWORD: discogsography
RABBITMQ_USERNAME: discogsography
STARTUP_DELAY: "30"
DATA_QUALITY_RULES: /discogs-data/extraction-rules.yaml
volumes:
- discogs_data:/discogs-data
- extractor_discogs_logs:/logs
- ./extractor/extraction-rules.yaml:/discogs-data/extraction-rules.yaml:ro
depends_on:
rabbitmq:
condition: service_healthy
networks:
- discogsography
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 5
start_period: 120s
restart: on-failure
logging: *default-logging
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
# Rust-based extractor service for MusicBrainz data
extractor-musicbrainz:
build:
context: .
dockerfile: extractor/Dockerfile
image: discogsography/extractor:latest
container_name: discogsography-extractor-musicbrainz
hostname: extractor-musicbrainz
command: ["--source", "musicbrainz"]
user: "1000:1000"
environment:
DISCOGS_HEALTH_URL: "http://extractor-discogs:8000/health"
LOG_LEVEL: info
MUSICBRAINZ_ROOT: /musicbrainz-data
PERIODIC_CHECK_DAYS: "3"
RABBITMQ_HOST: rabbitmq
RABBITMQ_PASSWORD: discogsography
RABBITMQ_USERNAME: discogsography
STARTUP_DELAY: "30"
volumes:
- musicbrainz_data:/musicbrainz-data
- extractor_musicbrainz_logs:/logs
depends_on:
rabbitmq:
condition: service_healthy
networks:
- discogsography
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 5
start_period: 120s
restart: on-failure
logging: *default-logging
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
# Graphinator service
graphinator:
build:
context: .
dockerfile: graphinator/Dockerfile
args:
PYTHON_VERSION: ${PYTHON_VERSION:-3.13}
UID: ${UID:-1000}
GID: ${GID:-1000}
image: discogsography/graphinator:latest
container_name: discogsography-graphinator
hostname: graphinator
user: "${UID:-1000}:${GID:-1000}"
environment:
CONSUMER_CANCEL_DELAY: "300" # 5 minutes before canceling idle consumers
LOG_LEVEL: INFO
NEO4J_BATCH_FLUSH_INTERVAL: "2.0" # Reduced from 5.0 for faster flushing
NEO4J_BATCH_MODE: "true"
NEO4J_BATCH_SIZE: "500" # Increased from 100 to 500
NEO4J_HOST: neo4j
NEO4J_PASSWORD: discogsography
NEO4J_USERNAME: neo4j
PYTHONUNBUFFERED: "1"
QUEUE_CHECK_INTERVAL: "3600" # 1 hour between queue checks when idle
RABBITMQ_HOST: rabbitmq
RABBITMQ_PASSWORD: discogsography
RABBITMQ_USERNAME: discogsography
STARTUP_DELAY: "15"
depends_on:
schema-init:
condition: service_completed_successfully
rabbitmq:
condition: service_healthy
neo4j:
condition: service_healthy
networks:
- discogsography
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:8001/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
restart: on-failure
logging: *default-logging
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
read_only: true
tmpfs:
- /tmp
volumes:
- graphinator_logs:/logs
# Brainzgraphinator service — MusicBrainz Neo4j enrichment
brainzgraphinator:
build:
context: .
dockerfile: brainzgraphinator/Dockerfile
args:
PYTHON_VERSION: ${PYTHON_VERSION:-3.13}
UID: ${UID:-1000}
GID: ${GID:-1000}
image: discogsography/brainzgraphinator:latest
container_name: discogsography-brainzgraphinator
hostname: brainzgraphinator
user: "${UID:-1000}:${GID:-1000}"
environment:
CONSUMER_CANCEL_DELAY: "300"
LOG_LEVEL: INFO
NEO4J_BATCH_FLUSH_INTERVAL: "2.0"
NEO4J_BATCH_MODE: "true"
NEO4J_BATCH_SIZE: "500"
NEO4J_HOST: neo4j
NEO4J_PASSWORD: discogsography
NEO4J_USERNAME: neo4j
PYTHONUNBUFFERED: "1"
QUEUE_CHECK_INTERVAL: "3600"
RABBITMQ_HOST: rabbitmq
RABBITMQ_PASSWORD: discogsography
RABBITMQ_USERNAME: discogsography
STARTUP_DELAY: "20"
depends_on:
schema-init:
condition: service_completed_successfully
rabbitmq:
condition: service_healthy
neo4j:
condition: service_healthy
networks:
- discogsography
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:8011/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
restart: on-failure
logging: *default-logging
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
read_only: true
tmpfs:
- /tmp
volumes:
- brainzgraphinator_logs:/logs
# Tableinator service
tableinator:
build:
context: .
dockerfile: tableinator/Dockerfile
args:
PYTHON_VERSION: ${PYTHON_VERSION:-3.13}
UID: ${UID:-1000}
GID: ${GID:-1000}
image: discogsography/tableinator:latest
container_name: discogsography-tableinator
hostname: tableinator
user: "${UID:-1000}:${GID:-1000}"
environment:
CONSUMER_CANCEL_DELAY: "300" # 5 minutes before canceling idle consumers
LOG_LEVEL: INFO
POSTGRES_BATCH_FLUSH_INTERVAL: "2.0" # Reduced from 5.0 for faster flushing
POSTGRES_BATCH_MODE: "true"
POSTGRES_BATCH_SIZE: "500" # Increased from 100 to 500
POSTGRES_DATABASE: discogsography
POSTGRES_HOST: postgres
POSTGRES_PASSWORD: discogsography
POSTGRES_USERNAME: discogsography
PYTHONUNBUFFERED: "1"
QUEUE_CHECK_INTERVAL: "3600" # 1 hour between queue checks when idle
RABBITMQ_HOST: rabbitmq
RABBITMQ_PASSWORD: discogsography
RABBITMQ_USERNAME: discogsography
STARTUP_DELAY: "20"
depends_on:
schema-init:
condition: service_completed_successfully
rabbitmq:
condition: service_healthy
postgres:
condition: service_healthy
networks:
- discogsography
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:8002/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 90s
restart: on-failure
logging: *default-logging
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
read_only: true
tmpfs:
- /tmp
volumes:
- tableinator_logs:/logs
# Brainztableinator service (MusicBrainz data to PostgreSQL)
brainztableinator:
build:
context: .
dockerfile: brainztableinator/Dockerfile
args:
PYTHON_VERSION: ${PYTHON_VERSION:-3.13}
UID: ${UID:-1000}
GID: ${GID:-1000}
image: discogsography/brainztableinator:latest
container_name: discogsography-brainztableinator
hostname: brainztableinator
user: "${UID:-1000}:${GID:-1000}"
environment:
CONSUMER_CANCEL_DELAY: "300" # 5 minutes before canceling idle consumers
LOG_LEVEL: INFO
POSTGRES_BATCH_FLUSH_INTERVAL: "2.0" # Reduced from 5.0 for faster flushing
POSTGRES_BATCH_MODE: "true"
POSTGRES_BATCH_SIZE: "500" # Increased from 100 to 500
POSTGRES_DATABASE: discogsography
POSTGRES_HOST: postgres
POSTGRES_PASSWORD: discogsography
POSTGRES_USERNAME: discogsography
PYTHONUNBUFFERED: "1"
QUEUE_CHECK_INTERVAL: "3600" # 1 hour between queue checks when idle
RABBITMQ_HOST: rabbitmq
RABBITMQ_PASSWORD: discogsography
RABBITMQ_USERNAME: discogsography
STARTUP_DELAY: "25"
depends_on:
schema-init:
condition: service_completed_successfully
rabbitmq:
condition: service_healthy
postgres:
condition: service_healthy
networks:
- discogsography
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:8010/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
restart: on-failure
logging: *default-logging
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
read_only: true
tmpfs:
- /tmp
volumes:
- brainztableinator_logs:/logs
# Dashboard service
dashboard:
build:
context: .
dockerfile: dashboard/Dockerfile
args:
PYTHON_VERSION: ${PYTHON_VERSION:-3.13}
UID: ${UID:-1000}
GID: ${GID:-1000}
image: discogsography/dashboard:latest
container_name: discogsography-dashboard
hostname: dashboard
user: "${UID:-1000}:${GID:-1000}"
environment:
LOG_LEVEL: INFO
NEO4J_HOST: neo4j
NEO4J_PASSWORD: discogsography
NEO4J_USERNAME: neo4j
POSTGRES_DATABASE: discogsography
POSTGRES_HOST: postgres
POSTGRES_PASSWORD: discogsography
POSTGRES_USERNAME: discogsography
PYTHONUNBUFFERED: "1"
RABBITMQ_HOST: rabbitmq
RABBITMQ_PASSWORD: discogsography
RABBITMQ_USERNAME: discogsography
REDIS_HOST: redis
API_HOST: api
API_PORT: "8004"
UV_CACHE_DIR: "/tmp/.cache/uv"
ports:
- "8003:8003"
depends_on:
schema-init:
condition: service_completed_successfully
rabbitmq:
condition: service_healthy
postgres:
condition: service_healthy
neo4j:
condition: service_healthy
redis:
condition: service_healthy
api:
condition: service_healthy
networks:
- discogsography
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8003/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 45s
restart: unless-stopped
logging: *default-logging
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
read_only: true
tmpfs:
- /tmp
- /.cache
volumes:
- dashboard_logs:/logs
# Explore service
explore:
build:
context: .
dockerfile: explore/Dockerfile
args:
PYTHON_VERSION: ${PYTHON_VERSION:-3.13}
UID: ${UID:-1000}
GID: ${GID:-1000}
image: discogsography/explore:latest
container_name: discogsography-explore
hostname: explore
user: "${UID:-1000}:${GID:-1000}"
environment:
API_BASE_URL: "http://api:8004"
LOG_LEVEL: INFO
PYTHONUNBUFFERED: "1"
depends_on:
schema-init:
condition: service_completed_successfully
api:
condition: service_healthy
networks:
- discogsography
ports:
- "8006:8006"
- "8007:8007"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8007/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
restart: unless-stopped
logging: *default-logging
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
read_only: true
tmpfs:
- /tmp
volumes:
- explore_logs:/logs
# Insights service — precomputed analytics and music trends
insights:
build:
context: .
dockerfile: insights/Dockerfile
args:
PYTHON_VERSION: ${PYTHON_VERSION:-3.13}
UID: ${UID:-1000}
GID: ${GID:-1000}
image: discogsography/insights:latest
container_name: discogsography-insights
hostname: insights
user: "${UID:-1000}:${GID:-1000}"
environment:
API_BASE_URL: "http://api:8004"
INSIGHTS_SCHEDULE_HOURS: "24"
LOG_LEVEL: INFO
POSTGRES_DATABASE: discogsography
POSTGRES_HOST: postgres
POSTGRES_PASSWORD: discogsography
POSTGRES_USERNAME: discogsography
PYTHONUNBUFFERED: "1"
REDIS_HOST: redis
STARTUP_DELAY: "10"
# INSIGHTS_MILESTONE_YEARS: "25,30,40,50,75,100"
depends_on:
api:
condition: service_healthy
schema-init:
condition: service_completed_successfully
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- discogsography
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:8009/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 90s
restart: unless-stopped
logging: *default-logging
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
read_only: true
tmpfs:
- /tmp
volumes:
- insights_logs:/logs
volumes:
rabbitmq_data:
postgres_data:
neo4j_data:
neo4j_logs:
neo4j_import:
neo4j_plugins:
redis_data:
discogs_data:
extractor_discogs_logs:
extractor_musicbrainz_logs:
schema_init_logs:
api_logs:
graphinator_logs:
brainzgraphinator_logs:
tableinator_logs:
dashboard_logs:
explore_logs:
brainztableinator_logs:
insights_logs:
musicbrainz_data: