forked from dockerstuff/docker-jupyterhub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yml
53 lines (39 loc) · 1.11 KB
/
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
version: "3"
name: jupyterhub
services:
jupyterhub:
image: ${JUPYTERHUB_IMAGE:?"Define JUPYTERHUB_IMAGE in .env file"}
build:
context: docker/dockerfiles/.
dockerfile: jupyterhub.dockerfile
args:
- JUPYTERHUB_VERSION = ${JUPYTERHUB_VERSION:-4}
volumes:
# Bind Docker socket on the host so we can connect to the daemon from
# within the container
- "/var/run/docker.sock:/var/run/docker.sock:rw"
# The JupyterHub configuration files
- "./docker/config:/srv/jupyterhub"
# Bind Docker volume on host for JupyterHub database and cookie secrets
- "jupyterhub-data:/data"
env_file:
- .env.notebook
environment:
# All containers will join this network
DOCKER_NETWORK_NAME: jupyterhub-network
container_name: jupyterhub
restart: always
command: >
jupyterhub -f /srv/jupyterhub/jupyterhub_config.py
ports:
- "8000:8000"
networks:
- jupyterhub-network
# Networks
networks:
jupyterhub-network:
name: jupyterhub-network
# Volumes
volumes:
jupyterhub-data:
name: jupyterhub-data