-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
216 lines (195 loc) · 6.02 KB
/
docker-compose.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
networks:
omotes:
driver: bridge
name: omotes
# mapeditor-net:
# external: true
volumes:
db-data:
broker-data:
influxdb_storage:
services:
rabbitmq:
image: rabbitmq:3.13-management
restart: unless-stopped
volumes:
- "broker-data:/var/lib/rabbitmq/"
- "${RABBITMQ_CONF_FILE:-./rabbitmq/rabbitmq.conf}:/etc/rabbitmq/rabbitmq.conf"
environment:
RABBITMQ_DEFAULT_USER: ${RABBITMQ_ROOT_USER}
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_ROOT_PASSWORD}
LOG_LEVEL: ${LOG_LEVEL}
hostname: rabbitmq-nwn
ports:
- "${RABBITMQ_PORT}:5672"
- "${RABBITMQ_MANAGEMENT_PORT}:15672"
networks:
- omotes
# - mapeditor-net
healthcheck:
test: rabbitmq-diagnostics -q listeners --node rabbit@rabbitmq-nwn
interval: 10s
timeout: 5s
retries: 10
omotes_influxdb:
image: influxdb:1.7
ports:
- "${INFLUXDB_PORT}:${INFLUXDB_PORT}"
- "${INFLUXDB_RPC_PORT}:${INFLUXDB_RPC_PORT}"
networks:
- omotes
# - mapeditor-net
environment:
INFLUXDB_ADMIN_USER: ${INFLUXDB_ADMIN_USER}
INFLUXDB_ADMIN_PASSWORD: ${INFLUXDB_ADMIN_PASSWORD}
INFLUXDB_HTTP_BIND_ADDRESS: :${INFLUXDB_PORT}
INFLUXDB_BIND_ADDRESS: :${INFLUXDB_RPC_PORT}
INFLUXDB_DB: omotes_timeseries
INFLUXDB_HTTP_AUTH_ENABLED: true
LOG_LEVEL: ${LOG_LEVEL}
healthcheck:
test:
["CMD", "curl", "-f", "http://omotes_influxdb:${INFLUXDB_PORT}/ping"]
interval: 10s
timeout: 5s
retries: 10
volumes:
- influxdb_storage:/var/lib/influxdb
orchestrator_postgres_db: &orchestrator_postgres_db
image: postgres:15.4
restart: unless-stopped
volumes:
- "db-data:/var/lib/postgresql/data/"
networks:
- omotes
environment:
PGDATA: /var/lib/postgresql/data
POSTGRES_DB: omotes_jobs
POSTGRES_USER: ${POSTGRES_ROOT_USER}
POSTGRES_PASSWORD: ${POSTGRES_ROOT_PASSWORD}
LOG_LEVEL: ${LOG_LEVEL}
healthcheck:
test:
[
"CMD",
"pg_isready",
"-U",
"${POSTGRES_ROOT_USER}",
"-d",
"omotes_jobs",
]
interval: 5s
timeout: 5s
retries: 10
# Skipper in 'docker-compose up', only used to develop database revisions.
orchestrator_postgres_db_dev:
<<: *orchestrator_postgres_db
hostname: orchestrator_postgres_db
ports:
- "${POSTGRES_DEV_PORT}:5432"
profiles:
- manual_dev
orchestrator:
image: ghcr.io/project-omotes/omotes_orchestrator:1.2.2
restart: unless-stopped
networks:
- omotes
volumes:
- "${WORKFLOW_SETTINGS_FILE:?}:/config/workflow_config.json"
environment:
CELERY_RABBITMQ_USERNAME: ${RABBITMQ_CELERY_USER_NAME}
CELERY_RABBITMQ_PASSWORD: ${RABBITMQ_CELERY_USER_PASSWORD}
CELERY_RABBITMQ_HOSTNAME: rabbitmq-nwn
CELERY_RABBITMQ_PORT: 5672
CELERY_RABBITMQ_VIRTUALHOST: omotes_celery
SDK_RABBITMQ_USERNAME: ${RABBITMQ_OMOTES_USER_NAME}
SDK_RABBITMQ_PASSWORD: ${RABBITMQ_OMOTES_USER_PASSWORD}
SDK_RABBITMQ_HOSTNAME: rabbitmq-nwn
SDK_RABBITMQ_PORT: 5672
SDK_RABBITMQ_VIRTUALHOST: omotes
TASK_RABBITMQ_USERNAME: ${RABBITMQ_CELERY_USER_NAME}
TASK_RABBITMQ_PASSWORD: ${RABBITMQ_CELERY_USER_PASSWORD}
TASK_RABBITMQ_HOSTNAME: rabbitmq-nwn
TASK_RABBITMQ_PORT: 5672
TASK_RABBITMQ_VIRTUALHOST: omotes_celery
POSTGRESQL_HOST: orchestrator_postgres_db
POSTGRESQL_PORT: 5432
POSTGRESQL_DATABASE: omotes_jobs
POSTGRESQL_USERNAME: ${POSTGRES_ORCHESTRATOR_USER_NAME}
POSTGRESQL_PASSWORD: ${POSTGRES_ORCHESTRATOR_USER_PASSWORD}
TIMEOUT_JOB_MANAGER_START_BUFFER_SEC: ${TIMEOUT_JOB_MANAGER_START_BUFFER_SEC}
TIMEOUT_JOB_HANDLER_RERUN_SEC: ${TIMEOUT_JOB_HANDLER_RERUN_SEC}
LOG_LEVEL: ${LOG_LEVEL}
depends_on:
rabbitmq:
condition: service_healthy
orchestrator_postgres_db:
condition: service_healthy
grow_worker_optimizer: &grow_worker
image: ghcr.io/project-omotes/omotes-grow-optimizer-worker:2.0.9
restart: unless-stopped
deploy:
replicas: 2
resources:
limits:
cpus: "4"
memory: 4gb
memswap_limit: 4gb
networks:
- omotes
environment: &grow_worker_env
INFLUXDB_HOSTNAME: omotes_influxdb
INFLUXDB_PORT: ${INFLUXDB_PORT}
INFLUXDB_USERNAME: ${INFLUXDB_FRONTEND_ADMIN_USER}
INFLUXDB_PASSWORD: ${INFLUXDB_FRONTEND_ADMIN_USER_PASSWORD}
RABBITMQ_HOSTNAME: rabbitmq-nwn
RABBITMQ_PORT: 5672
RABBITMQ_USERNAME: ${RABBITMQ_CELERY_USER_NAME}
RABBITMQ_PASSWORD: ${RABBITMQ_CELERY_USER_PASSWORD}
RABBITMQ_VIRTUALHOST: omotes_celery
GROW_TASK_TYPE: grow_optimizer_default
LOG_LEVEL: ${LOG_LEVEL}
depends_on:
rabbitmq:
condition: service_healthy
grow_worker_simulator:
<<: *grow_worker
environment:
<<: *grow_worker_env
GROW_TASK_TYPE: grow_simulator
grow_worker_optimizer_no_heat_losses:
<<: *grow_worker
environment:
<<: *grow_worker_env
GROW_TASK_TYPE: grow_optimizer_no_heat_losses
grow_worker_optimizer_with_pressure:
<<: *grow_worker
environment:
<<: *grow_worker_env
GROW_TASK_TYPE: grow_optimizer_with_pressure
omotes_simulator_worker:
image: ghcr.io/project-omotes/omotes-simulator-worker:0.0.17
restart: unless-stopped
deploy:
replicas: 2
resources:
limits:
cpus: "4"
memory: 4gb
memswap_limit: 4gb
networks:
- omotes
environment:
INFLUXDB_HOSTNAME: omotes_influxdb
INFLUXDB_PORT: ${INFLUXDB_PORT}
INFLUXDB_USERNAME: ${INFLUXDB_ADMIN_USER}
INFLUXDB_PASSWORD: ${INFLUXDB_ADMIN_PASSWORD}
RABBITMQ_HOSTNAME: rabbitmq-nwn
RABBITMQ_PORT: 5672
RABBITMQ_USERNAME: ${RABBITMQ_CELERY_USER_NAME}
RABBITMQ_PASSWORD: ${RABBITMQ_CELERY_USER_PASSWORD}
RABBITMQ_VIRTUALHOST: omotes_celery
LOG_LEVEL: ${LOG_LEVEL}
depends_on:
rabbitmq:
condition: service_healthy