-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose_dag.yml
49 lines (46 loc) · 1.51 KB
/
docker-compose_dag.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
version: '3.7'
# Associate MiG Services
configs:
cull_idle_config:
file: ./hub/srv/jupyterhub/cull_idle_servers.py
services:
proxy:
image: jupyterhub/configurable-http-proxy
environment:
CONFIGPROXY_AUTH_TOKEN: ${CONFIGPROXY_AUTH_TOKEN}
TZ: ${TZ}
ports:
- "8000:8000"
command:
configurable-http-proxy --default-target=http://dag:8000 --error-target=http://dag:8000/hub/error
dag:
image: ucphhpc/jupyterhub:latest
deploy:
placement:
constraints: [node.role == manager]
environment:
JUPYTERHUB_CRYPT_KEY: ${JUPYTERHUB_CRYPT_KEY}
CONFIGPROXY_AUTH_TOKEN: ${CONFIGPROXY_AUTH_TOKEN}
TZ: ${TZ}
configs:
# Mount both the config file for the jupyterhub server itself and the
# script that kills idle containers. Furthermore the base-notebook
# notebook image config must be mounted so that jupyterhub has access
# to it
- source: cull_idle_config
target: /srv/jupyterhub/cull_idle_servers.py
mode: 0440
volumes:
# The jupyterhub service needs accces to the docker daemon process
# to launch addtional notebook services from within the service itself
- /var/run/docker.sock:/var/run/docker.sock:rw
# Keep the jhub states such as the db saved during restarts
- type: volume
source: jhubstate
target: /srv/jupyterhub
- type: bind
source: ./hub/etc/jupyterhub
target: /etc/jupyterhub
command: jupyterhub -f /etc/jupyterhub/jupyterhub_config.py
volumes:
jhubstate: