-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
143 lines (139 loc) · 6.85 KB
/
docker-compose.dev.yml
File metadata and controls
143 lines (139 loc) · 6.85 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
# ==============================================================================
# CIVERS Full Stack - Local Development Override
# ==============================================================================
#
# This compose file provides a simple local development setup:
# - Direct port access (no Traefik/HTTPS)
# - Standard Docker socket path
# - Hot-reload enabled where supported
# - Debug logging
#
# Usage:
# # Start all services for local development
# docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d
#
# # View logs
# docker compose -f docker-compose.yml -f docker-compose.dev.yml logs -f
#
# # Stop all services
# docker compose -f docker-compose.yml -f docker-compose.dev.yml down
#
# Access Points:
# - Web Interface: http://localhost:8000
# - Kafka UI: http://localhost:8080 (if enabled)
#
# ==============================================================================
services:
# ============================================================================
# Web Interface - Local Development Override
# ============================================================================
web-interface:
environment:
- CONFIG_ENVIRONMENT=${CONFIG_ENVIRONMENT:-docker}
- LOG_LEVEL=DEBUG
- DEBUG=true
# Callback URL must use localhost so orchestrator (on host network) can reach it
- CALLBACK_BASE_URL=http://localhost:8000
# Suppress verbose Kafka client logs
- KAFKA_LOG_LEVEL=WARNING
ports:
- "8000:8000"
# Hot-reload: Mount source code and use watchfiles to auto-restart
volumes:
- ./civers_archive_web_interface/app:/app/app:ro
- ./civers_archive_web_interface/static:/app/static:ro
- ./civers_archive_web_interface/templates:/app/templates:ro
- ./civers_archive_web_interface/configs:/app/configs:ro
command: [ "bash", "-c", ". /opt/venv/bin/activate && exec watchfiles 'uvicorn app.main:app --host 0.0.0.0 --port 8000' app static templates configs /shared-configs" ]
# ============================================================================
# Orchestrator - Local Development Override
# Uses host network so document_url uses localhost (reachable by metadata-extractor)
# ============================================================================
orchestrator:
network_mode: host
networks: !override [] # Clear networks from base file (mutually exclusive with network_mode)
environment:
- CONFIG_ENVIRONMENT=${CONFIG_ENVIRONMENT:-docker}
- LOG_LEVEL=DEBUG
# Use localhost since we're on host network
- KAFKA_BOOTSTRAP_SERVERS=localhost:29092
- CIVERS_API_URL=http://localhost:8000
- WEB_INTERFACE_URL=http://localhost:8000
# Suppress verbose Kafka client logs
- KAFKA_LOG_LEVEL=WARNING
# Hot-reload: Mount source code and use watchfiles to auto-restart
volumes:
- ./civers_orchestrator/orchestration_services:/app/orchestration_services:ro
- ./civers_orchestrator/transport_services:/app/transport_services:ro
- ./civers_orchestrator/models:/app/models:ro
- ./civers_orchestrator/configs:/app/configs:ro
- ./civers_orchestrator/main.py:/app/main.py:ro
command: [ "bash", "-c", ". /app/.venv/bin/activate && exec watchfiles 'python main.py' main.py orchestration_services transport_services models /shared-configs" ]
# ============================================================================
# Archive Generator - Local Development Override
# Uses host network to access VPN-only URLs (e.g., arachne.test.dainst.org)
# ============================================================================
archive-generator:
network_mode: host
networks: !override [] # Clear networks from base file (mutually exclusive with network_mode)
environment:
- CONFIG_ENVIRONMENT=${CONFIG_ENVIRONMENT:-docker}
- LOG_LEVEL=DEBUG
# Use localhost since we're on host network
- KAFKA_BOOTSTRAP_SERVERS=localhost:29092
- CIVERS_API_URL=http://localhost:8000
# Suppress verbose Kafka client logs
- KAFKA_LOG_LEVEL=WARNING
# Hot-reload: Mount source code and use watchfiles to auto-restart
volumes:
- ./civers_archive_generator/archive_generators:/app/archive_generators:ro
- ./civers_archive_generator/archive_services:/app/archive_services:ro
- ./civers_archive_generator/transport_services:/app/transport_services:ro
- ./civers_archive_generator/storage_layer:/app/storage_layer:ro
- ./civers_archive_generator/configs:/app/configs:ro
- ./civers_archive_generator/main.py:/app/main.py:ro
command: [ "bash", "-c", ". /app/.venv/bin/activate && exec watchfiles 'python main.py' main.py archive_generators archive_services transport_services storage_layer /shared-configs" ]
# ============================================================================
# Metadata Extractor - Local Development Override
# Uses host network for consistency with archive-generator
# ============================================================================
metadata-extractor:
network_mode: host
networks: !override [] # Clear networks from base file (mutually exclusive with network_mode)
environment:
- CONFIG_ENVIRONMENT=${CONFIG_ENVIRONMENT:-docker}
- LOG_LEVEL=DEBUG
# Use localhost since we're on host network
- KAFKA_BOOTSTRAP_SERVERS=localhost:29092
- CIVERS_API_URL=http://localhost:8000
# Suppress verbose Kafka client logs
- KAFKA_LOG_LEVEL=WARNING
# Hot-reload: Mount source code and use watchfiles to auto-restart
volumes:
- ./civers_metadata_extractor/metadata_extractors:/app/metadata_extractors:ro
- ./civers_metadata_extractor/metadata_extraction_services:/app/metadata_extraction_services:ro
- ./civers_metadata_extractor/transport_services:/app/transport_services:ro
- ./civers_metadata_extractor/storage_layer:/app/storage_layer:ro
- ./civers_metadata_extractor/configs:/app/configs:ro
- ./civers_metadata_extractor/models:/app/models:ro
- ./civers_metadata_extractor/main.py:/app/main.py:ro
command: [ "bash", "-c", ". /app/.venv/bin/activate && exec watchfiles 'python main.py' main.py metadata_extraction_services metadata_extractors transport_services storage_layer models /shared-configs" ]
# ============================================================================
# Optional: Kafka UI for debugging message flow
# ============================================================================
kafka-ui:
image: provectuslabs/kafka-ui:latest
container_name: civers-kafka-ui
environment:
KAFKA_CLUSTERS_0_NAME: civers-local
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:9092
SERVER_SERVLET_CONTEXT_PATH: /
ports:
- "8080:8080"
networks:
- civers-network
depends_on:
kafka:
condition: service_healthy
profiles:
- debug