-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcompose.dev.yml
More file actions
211 lines (198 loc) · 5.21 KB
/
Copy pathcompose.dev.yml
File metadata and controls
211 lines (198 loc) · 5.21 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
name: databus-dev
services:
orchestrator:
build:
context: ./backend
target: dev
environment:
- DJANGO_SETUP=True
- UV_PROJECT_ENVIRONMENT=/home/app/.venv
- PYTHONPYCACHEPREFIX=/tmp/pycache
env_file:
- .env
- .env.dev
ports:
- "${BACKEND_PORT:-8000}:8000"
volumes:
- ./backend:/app
- backend_venv:/home/app/.venv
depends_on:
database:
condition: service_healthy
state:
condition: service_healthy
realtime-engine:
build:
context: ./backend
target: realtime-engine
environment:
- DJANGO_SETUP=False
- UV_PROJECT_ENVIRONMENT=/home/app/.venv
- PYTHONPYCACHEPREFIX=/tmp/pycache
- MQTT_CONSUMER_ENABLED=true
- MQTT_HOST=telemetry-broker
- MQTT_PORT=1883
env_file:
- .env
- .env.dev
volumes:
- ./backend:/app
- backend_venv:/home/app/.venv
depends_on:
database:
condition: service_healthy
state:
condition: service_healthy
message-broker:
condition: service_healthy
telemetry-broker:
condition: service_started
schedule-engine:
build:
context: ./backend
target: schedule-engine
environment:
- DJANGO_SETUP=False
- UV_PROJECT_ENVIRONMENT=/home/app/.venv
- PYTHONPYCACHEPREFIX=/tmp/pycache
env_file:
- .env
- .env.dev
volumes:
- ./backend:/app
- backend_venv:/home/app/.venv
depends_on:
database:
condition: service_healthy
state:
condition: service_healthy
message-broker:
condition: service_healthy
scheduler:
build:
context: ./backend
target: scheduler
environment:
- DJANGO_SETUP=False
- UV_PROJECT_ENVIRONMENT=/home/app/.venv
- PYTHONPYCACHEPREFIX=/tmp/pycache
env_file:
- .env
- .env.dev
volumes:
- ./backend:/app
- backend_venv:/home/app/.venv
depends_on:
database:
condition: service_healthy
state:
condition: service_healthy
message-broker:
condition: service_healthy
database:
build:
context: ./database
environment:
- POSTGRES_DB=${DB_NAME:-databus}
- POSTGRES_USER=${DB_USER:-postgres}
- POSTGRES_HOST_AUTH_METHOD=trust
volumes:
- database_data:/var/lib/postgresql
healthcheck:
test: ["CMD", "pg_isready", "-U", "${DB_USER:-postgres}", "-d", "${DB_NAME:-databus}"]
interval: 10s
timeout: 5s
retries: 5
state:
image: redis:7-alpine
command: ["redis-server", "--appendonly", "yes"]
ports:
- "${STATE_PORT:-6379}:6379"
volumes:
- state_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
telemetry-broker:
image: emqx/nanomq:0.24.9-full
ports:
- "${MQTT_BROKER_PORT:-1883}:1883"
volumes:
- ./telemetry-broker/nanomq.conf:/etc/nanomq.conf
message-broker:
image: rabbitmq:4-management
ports:
- "${MESSAGE_BROKER_AMQP_PORT:-5672}:5672" # AMQP
- "${MESSAGE_BROKER_MANAGEMENT_PORT:-15672}:15672" # Management UI
- "${MESSAGE_BROKER_PROMETHEUS_PORT:-15692}:15692" # Prometheus
volumes:
- ./message-broker/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf:ro
- message_broker_data:/var/lib/rabbitmq
environment:
- RABBITMQ_DEFAULT_USER=${RABBITMQ_DEFAULT_USER:-guest}
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_DEFAULT_PASS:-guest}
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "status"]
interval: 10s
timeout: 5s
retries: 5
analytics-engine:
image: prefecthq/prefect:3-latest
ports:
- "${ANALYTICS_PORT:-4200}:4200"
environment:
- PREFECT_SERVER_API_HOST=${PREFECT_SERVER_API_HOST:-0.0.0.0}
- PREFECT_API_URL=${PREFECT_API_URL:-http://localhost:4200/api}
volumes:
- ./analytics-engine:/prefect
working_dir: /prefect
command: prefect server start
task-monitoring:
image: mher/flower:2.0
environment:
- CELERY_BROKER_URL=amqp://${RABBITMQ_USER:-guest}:${RABBITMQ_PASS:-guest}@${RABBITMQ_HOST:-message-broker}:${RABBITMQ_PORT:-5672}//
- TZ=America/Costa_Rica
ports:
- "${TASK_MONITORING_PORT:-5555}:5555"
depends_on:
message-broker:
condition: service_healthy
user-interface:
build:
context: ./frontend
dockerfile: Dockerfile
target: dev
environment:
- NUXT_PUBLIC_API_BASE=http://orchestrator:8000
- NUXT_PORT=3000
env_file:
- .env
- .env.dev
ports:
- "${USER_INTERFACE_PORT:-3000}:3000"
volumes:
- ./frontend:/app
- ui_node_modules:/app/node_modules
- ui_pnpm_store:/pnpm-store
# Nuxt writes these constantly; keep them on native volumes, not the
# macOS bind mount, to avoid "Unknown system error -35" on write/open.
- /app/.nuxt
- /app/.output
- /app/.nitro
- /app/.cache
depends_on:
orchestrator:
condition: service_started
volumes:
database_data:
state_data:
lake_data:
message_broker_data:
ui_node_modules:
ui_pnpm_store:
backend_venv:
networks:
default:
name: databus_network