-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
69 lines (64 loc) · 2.03 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
version: '3.7'
configs:
jupyterhub_config:
file: ./hub/jupyterhub_config.py
cull_idle_config:
file: ./hub/cull_idle_servers.py
services:
proxy:
image: jupyterhub/configurable-http-proxy
environment:
CONFIGPROXY_AUTH_TOKEN: "${CONFIGPROXY_AUTH_TOKEN}"
TZ: ${TZ}
ports:
- "80:8000"
command:
configurable-http-proxy --default-target=http://jupyterhub:8000 --error-target=http://jupyterhub:8000/hub/error
jupyterhub:
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: jupyterhub_config
target: /etc/jupyterhub/jupyterhub_config.py
mode: 0440
- 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
command: jupyterhub -f /etc/jupyterhub/jupyterhub_config.py
docker-volume-monitor:
image: uchhpc/docker-volume-monitor:latest
deploy:
mode: global
environment:
TZ: ${TZ}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
docker-image-updater:
image: uchhpc/docker-image-updater:latest
deploy:
mode: global
environment:
TZ: ${TZ}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: -update ucphhpc/base-notebook
volumes:
jhubstate: