-
Notifications
You must be signed in to change notification settings - Fork 100
/
docker-compose_just.yml
executable file
·264 lines (246 loc) · 6.51 KB
/
docker-compose_just.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
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
# Docker Compose file for ChRIS backend development.
# See justfile for usage. *DO NOT* use the `docker compose` command directly.
services:
chrisomatic:
image: ghcr.io/fnndsc/chrisomatic:1.0.0
profiles:
- tools
volumes:
- "./chrisomatic-just:/etc/chrisomatic:ro"
- "${DOCKER_SOCK:-/var/run/docker.sock}:/var/run/docker.sock"
working_dir: /etc/chrisomatic
userns_mode: host
depends_on:
- chris
networks:
- local
chris:
image: ${CUBE_IMAGE:-localhost/fnndsc/cube:dev}
build:
context: .
args:
ENVIRONMENT: local
ports:
- "8000:8000"
volumes: &CHRIS_VOLUMES
- chris_files:/data
- ./chris_backend:/opt/app-root/src
environment: &CHRIS_ENV
DJANGO_SETTINGS_MODULE: "config.settings.local"
STORAGE_ENV: "fslink"
SPECTACULAR_SPLIT_REQUEST: "${SPECTACULAR_SPLIT_REQUEST-false}"
stdin_open: true # docker run -i
tty: true # docker run -t
command: python manage.py runserver 0.0.0.0:8000
user: ${UID:?Please run me using just.}:${GID:?Please run me using just.}
profiles:
- cube
depends_on: &CHRIS_DEPENDS
db:
condition: service_healthy
rabbitmq:
condition: service_started
nats:
condition: service_started
cube-nonroot-user-volume-fix:
condition: service_completed_successfully
networks:
local:
aliases:
- chrisdev.local # hard-coded in chrisomatic/*.yml
healthcheck:
test: [ "CMD", "sh", "-c", "curl -f http://localhost:8000/api/v1/users/ || exit 1" ]
interval: 10s
timeout: 5s
retries: 5
start_period: 60s
worker-mains:
image: ${CUBE_IMAGE:-localhost/fnndsc/cube:dev}
command: celery -A core worker -c 4 -l info -Q main1,main2
volumes: *CHRIS_VOLUMES
environment: *CHRIS_ENV
user: ${UID}:${GID}
profiles:
- cube
depends_on: *CHRIS_DEPENDS
networks:
- local
worker-periodic:
image: ${CUBE_IMAGE:-localhost/fnndsc/cube:dev}
command: celery -A core worker -c 2 -l info -Q periodic
volumes: *CHRIS_VOLUMES
environment: *CHRIS_ENV
user: ${UID}:${GID}
profiles:
- cube
depends_on: *CHRIS_DEPENDS
networks:
- local
celery-scheduler:
image: ${CUBE_IMAGE:-localhost/fnndsc/cube:dev}
command: celery -A core beat -l info --scheduler django_celery_beat.schedulers:DatabaseScheduler
volumes: *CHRIS_VOLUMES
environment: *CHRIS_ENV
user: ${UID}:${GID}
profiles:
- cube
depends_on: *CHRIS_DEPENDS
networks:
- local
db:
image: docker.io/library/postgres:16
volumes:
- db:/var/lib/postgresql/data
environment:
- POSTGRES_DB=chris_dev
- POSTGRES_USER=chris
- POSTGRES_PASSWORD=Chris1234
healthcheck:
test: ["CMD", "pg_isready"]
interval: 2s
timeout: 4s
retries: 3
start_period: 60s
networks:
local:
aliases:
- chris_dev_db # hard-coded in chris_backend/config/settings/local.py
rabbitmq:
image: docker.io/library/rabbitmq:3
volumes:
- rabbitmq:/var/lib/rabbitmq
networks:
local:
aliases:
- queue # hard-coded in chris_backend/config/settings/local.py
pfcon:
image: ${PFCON_IMAGE:-ghcr.io/fnndsc/pfcon:latest}
environment:
COMPUTE_SERVICE_URL: http://pman:5010/api/v1/
SECRET_KEY: secret
PFCON_USER: pfcon
PFCON_PASSWORD: pfcon1234
PFCON_INNETWORK: "true"
STORAGE_ENV: "fslink"
STOREBASE_MOUNT: /var/local/storeBase
# port is hard-coded in chris_backend/config/settings/local.py
command: gunicorn -b 0.0.0.0:30005 -w 8 -t 120 pfcon.wsgi:application
ports:
- "30005:30005"
volumes:
- chris_files:/var/local/storeBase
user: ${UID}:${GID}
networks:
local:
aliases:
- pfcon.remote # hard-coded in chris_backend/config/settings/local.py
labels:
org.chrisproject.role: "pfcon"
pman:
image: ${PMAN_IMAGE:-ghcr.io/fnndsc/pman:latest}
environment:
CONTAINER_ENV: docker
CONTAINER_USER: "${UID}:${GID}"
ENABLE_HOME_WORKAROUND: "yes"
JOB_LABELS: "org.chrisproject.miniChRIS=plugininstance"
SECRET_KEY: secret
REMOVE_JOBS: "yes"
volumes:
- "${DOCKER_SOCK:-/var/run/docker.sock}:/var/run/docker.sock"
depends_on:
- pfcon
ports:
- "5010:5010"
networks:
- local
userns_mode: "host"
nats:
image: docker.io/library/nats:2.10.20-alpine3.20
ports:
- "4222:4222"
- "8222:8222"
networks:
local:
healthcheck:
test: wget http://localhost:8222/healthz -q -S -O -
start_period: 20s
retries: 3
timeout: 10s
interval: 5s
lldap:
image: docker.io/nitnelave/lldap:stable
ports:
- "3890:3890"
- "17170:17170"
volumes:
- "lldap:/data"
environment:
TZ: America/New_York
LLDAP_JWT_SECRET: super_secret_random_string
LLDAP_LDAP_USER_PASS: chris1234
LLDAP_LDAP_BASE_DN: dc=example,dc=org
networks:
local:
cube-nonroot-user-volume-fix:
image: docker.io/library/alpine:latest
volumes:
- chris_files:/data
user: root
command: chmod 777 /data
restart: "no"
openapi-generator:
image: docker.io/openapitools/openapi-generator-cli:v7.8.0
volumes:
- ${OPENAPI_GENERATOR_OUTPUT:-./clients}:/out:rw
user: ${UID:?Please run me using just.}:${GID:?Please run me using just.}
profiles:
- cube
- tools
networks:
- local
depends_on:
chris:
condition: service_healthy
orthanc:
image: docker.io/jodogne/orthanc-plugins:1.12.3
volumes:
- ./orthanc.json:/etc/orthanc/orthanc.json:ro
- orthanc:/var/lib/orthanc/db
ports:
- "4242:4242"
- "8042:8042"
networks:
- local
pfdcm:
image: ghcr.io/fnndsc/pfdcm:3.1.2
container_name: pfdcm
environment:
MAX_WORKERS: 1
volumes:
- pfdcm:/home/dicom:rw
- ./pfdcm-services:/home/dicom/services:ro
- chris_files:/chris_files:rw
ports:
- "4005:4005"
networks:
- local
user: "1001"
depends_on:
pfdcm-nonroot-user-volume-fix:
condition: service_completed_successfully
pfdcm-nonroot-user-volume-fix:
image: docker.io/library/alpine:latest
volumes:
- pfdcm:/home/dicom:rw
user: root
command: chown 1001 /home/dicom
restart: "no"
volumes:
chris_files:
db:
lldap:
rabbitmq:
orthanc:
pfdcm:
networks:
local: