-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
43 lines (40 loc) · 1.21 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
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
# JupyterHub docker-compose configuration file
version: "2"
services:
hub:
build:
context: .
dockerfile: Dockerfile
args:
HUB_VERSION: ${HUB_VERSION}
restart: always
image: jupyterhub
container_name: jupyterhub
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"
# Bind Docker volume on host for JupyterHub database and cookie secrets
- ${HOME_DIR}/cookie:/data
# config
- ${JUPYTERHUB_CONFIG}:/srv/jupyterhub/jupyterhub_config.py
# user & image list
- ${USER_LIST}:/srv/jupyterhub/config.yaml
environment:
# All containers will join this network
DOCKER_NETWORK_NAME: ${DOCKER_NETWORK_NAME}
# proxy
CONFIGPROXY_AUTH_TOKEN: ${CONFIGPROXY_AUTH_TOKEN}
JHUB_DIR: ${JHUB_DIR}
HOME_DIR: ${HOME_DIR}
HOSTNODE: ${HOSTNAME}
env_file:
- ${OAUTH}
command: >
jupyterhub -f /srv/jupyterhub/jupyterhub_config.py
networks:
default:
external:
name: ${DOCKER_NETWORK_NAME}