-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
241 lines (232 loc) · 7.81 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
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
version: '3.8'
services:
cantaloupe:
image: uclalibrary/cantaloupe:5.0.3-0
volumes:
- cantaloupe-data:/imageroot
ports:
- 8182:8182
arches:
restart: unless-stopped
entrypoint: ["../entrypoint.sh"]
build:
context: ${ARCHES_PROJECT_ROOT}.
dockerfile: ${ARCHES_PROJECT_ROOT}./docker/Dockerfile
args:
- ARCHES_PROJECT=$ARCHES_PROJECT
- ARCHES_BASE=$ARCHES_BASE
command: run_arches
volumes:
- arches-log:/arches/arches/logs
- arches-static:/static_root
# $ARCHES_ROOT:/web_root/arches
# $ARCHES_ROOT/docker/gunicorn_config.py:/web_root/arches/gunicorn_config.py
# ./$ARCHES_PROJECT/media/node_modules/arches/docker/gunicorn_config.py:/web_root/arches/arches/gunicorn_config.py
- ${ARCHES_PROJECT_ROOT}.:/web_root/$ARCHES_PROJECT
- ${ARCHES_PROJECT_ROOT}./docker/entrypoint.sh:/web_root/entrypoint.sh
- ${ARCHES_PROJECT_ROOT}./docker/settings_docker.py:/web_root/$ARCHES_PROJECT/$ARCHES_PROJECT/settings_local.py
environment:
- ARCHES_PROJECT=$ARCHES_PROJECT
- INSTALL_DEFAULT_GRAPHS=False
- INSTALL_DEFAULT_CONCEPTS=False
- PGUSERNAME=postgres
- PGPASSWORD=postgres
- PGDBNAME=arches
- PGHOST=db
- PGPORT=5432
- ESHOST=elasticsearch
- ESPORT=9200
- CELERY_BROKER_URL=amqp://rabbitmq:rabbitmq@rabbitmq
- DJANGO_MODE=PROD
- DJANGO_DEBUG=True
- DOMAIN_NAMES=localhost
- PYTHONUNBUFFERED=0
- TZ=PST
- ARCHES_ROOT=/web_root/arches
- COMPRESS_OFFLINE=False
- STATIC_URL=/static/
- STATIC_ROOT=/static_root
- RABBITMQ_USER=rabbitmq
- RABBITMQ_PASS=rabbitmq
- CANTALOUPE_HOST=cantaloupe
- CANTALOUPE_PORT=8182
- COMPRESS_ENABLED=False
- WEB_ROOT=/web_root
ports:
- '8000:8000'
depends_on:
- db
- elasticsearch
- cantaloupe
arches_base:
profiles: ["base"]
image: $ARCHES_BASE
restart: unless-stopped
user: root
volumes:
- ${ARCHES_PROJECT_ROOT}:/local_root
environment:
- ARCHES_PROJECT=$ARCHES_PROJECT
- INSTALL_DEFAULT_GRAPHS=False
- INSTALL_DEFAULT_CONCEPTS=False
- PGUSERNAME=postgres
- PGPASSWORD=postgres
- PGDBNAME=arches
- PGHOST=db
- PGPORT=5432
- ESHOST=elasticsearch
- ESPORT=9200
- DJANGO_MODE=DEV
- DJANGO_DEBUG=True
# - DJANGO_REMOTE_DEBUG=False
- DOMAIN_NAMES=localhost
- PYTHONUNBUFFERED=0
- TZ=PST
arches_api:
profiles: ["api"]
image: arches_${ARCHES_PROJECT}:latest
restart: unless-stopped
entrypoint: ["../entrypoint.sh"]
build:
context: ${ARCHES_PROJECT_ROOT}.
dockerfile: ${ARCHES_PROJECT_ROOT}./docker/Dockerfile
args:
- ARCHES_PROJECT=$ARCHES_PROJECT
- ARCHES_BASE=$ARCHES_BASE
command: run_api
ports:
- '8001:8000'
volumes:
- arches-log:/arches/arches/logs
- arches-static:/static_root
# $ARCHES_ROOT:/web_root/arches
# $ARCHES_ROOT/docker/gunicorn_config.py:/web_root/arches/gunicorn_config.py
# ./$ARCHES_PROJECT/media/node_modules/arches/docker/gunicorn_config.py:/web_root/arches/arches/gunicorn_config.py
- ${ARCHES_PROJECT_ROOT}.:/web_root/$ARCHES_PROJECT
- ${ARCHES_PROJECT_ROOT}./docker/entrypoint.sh:/web_root/entrypoint.sh
- ${ARCHES_PROJECT_ROOT}./docker/settings_docker.py:/web_root/$ARCHES_PROJECT/$ARCHES_PROJECT/settings_local.py
# ${ARCHES_PROJECT_ROOT}./../arches-orm/arches_orm:/web_root/ENV/lib/python3.10/site-packages/arches_orm
environment:
- ARCHES_PROJECT=$ARCHES_PROJECT
- INSTALL_DEFAULT_GRAPHS=False
- INSTALL_DEFAULT_CONCEPTS=False
- GUNICORN_WORKER_TIMEOUT=300
- PGUSERNAME=postgres
- PGPASSWORD=postgres
- PGDBNAME=arches
- PGHOST=db
- PGPORT=5432
- ESHOST=elasticsearch
- ESPORT=9200
- DJANGO_MODE=DEV
- DJANGO_DEBUG=True
# - DJANGO_REMOTE_DEBUG=False
- DOMAIN_NAMES=localhost
- PYTHONUNBUFFERED=0
- CELERY_BROKER_URL=amqp://rabbitmq:rabbitmq@rabbitmq
- RABBITMQ_USER=rabbitmq
- RABBITMQ_PASS=rabbitmq
- CANTALOUPE_HOST=cantaloupe
- CANTALOUPE_PORT=8182
- TZ=PST
depends_on:
- db
- elasticsearch
- rabbitmq
- cantaloupe
arches_worker:
image: arches_${ARCHES_PROJECT}:latest
restart: unless-stopped
entrypoint: ["../entrypoint.sh"]
build:
context: ${ARCHES_PROJECT_ROOT}.
dockerfile: ${ARCHES_PROJECT_ROOT}./docker/Dockerfile
args:
- ARCHES_PROJECT=$ARCHES_PROJECT
- ARCHES_BASE=$ARCHES_BASE
command: run_celery
user: root
volumes:
- arches-log:/arches/arches/logs
- arches-static:/static_root
# $ARCHES_ROOT:/web_root/arches
# $ARCHES_ROOT/docker/gunicorn_config.py:/web_root/arches/gunicorn_config.py
# ./$ARCHES_PROJECT/media/node_modules/arches/docker/gunicorn_config.py:/web_root/arches/arches/gunicorn_config.py
- ${ARCHES_PROJECT_ROOT}.:/web_root/$ARCHES_PROJECT
- ${ARCHES_PROJECT_ROOT}./docker/entrypoint.sh:/web_root/entrypoint.sh
- ${ARCHES_PROJECT_ROOT}./docker/settings_docker.py:/web_root/$ARCHES_PROJECT/$ARCHES_PROJECT/settings_local.py
# ${ARCHES_PROJECT_ROOT}./../arches-orm/arches_orm:/web_root/ENV/lib/python3.10/site-packages/arches_orm
environment:
- ARCHES_PROJECT=$ARCHES_PROJECT
- INSTALL_DEFAULT_GRAPHS=False
- INSTALL_DEFAULT_CONCEPTS=False
- PGUSERNAME=postgres
- PGPASSWORD=postgres
- PGDBNAME=arches
- PGHOST=db
- PGPORT=5432
- ESHOST=elasticsearch
- ESPORT=9200
- DJANGO_MODE=DEV
- DJANGO_DEBUG=True
# - DJANGO_REMOTE_DEBUG=False
- DOMAIN_NAMES=localhost
- PYTHONUNBUFFERED=0
- CELERY_BROKER_URL=amqp://rabbitmq:rabbitmq@rabbitmq
- RABBITMQ_USER=rabbitmq
- RABBITMQ_PASS=rabbitmq
- CANTALOUPE_HOST=cantaloupe
- CANTALOUPE_PORT=8182
- TZ=PST
depends_on:
- db
- elasticsearch
- rabbitmq
- arches
- cantaloupe
db:
# NOTE: due to a race condition, this needs docker-compose run db first to ensure
# template directory created
image: kartoza/postgis:12.0
volumes:
- postgres-data:/var/lib/postgresql
- postgres-log:/var/log/postgresql
- ${ARCHES_PROJECT_ROOT}./docker/init-unix.sql:/docker-entrypoint-initdb.d/init.sql # to set up the DB template
ports:
- '5432:5432'
expose:
- '5432'
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASS=postgres
- POSTGRESQL_USER=postgres
- POSTGRESQL_PASS=postgres
- POSTGRES_DB=postgres
- POSTGRES_MULTIPLE_EXTENSIONS=postgis,postgis_topology
- SHARED_PRELOAD_LIBRARIES=pg_stat_statements
- TZ=PST
elasticsearch:
image: elasticsearch:8.4.0
volumes:
- elasticsearch-data:/usr/share/elasticsearch/data
ports:
- "9200:9200"
- "9300:9300"
environment:
- TZ=PST
- discovery.type=single-node
- discovery.seed_hosts=[]
- xpack.security.enabled=false
- "ES_JAVA_OPTS=-Xms400m -Xmx400m"
rabbitmq:
image: rabbitmq
environment:
- RABBITMQ_DEFAULT_USER=rabbitmq
- RABBITMQ_DEFAULT_PASS=rabbitmq
volumes:
arches-log:
arches-static:
postgres-log:
postgres-data:
elasticsearch-data:
cantaloupe-data: