updates to working config with spawner.
This commit is contained in:
parent
d2bed7a1ce
commit
8473a44985
4
.env
4
.env
@ -7,7 +7,7 @@
|
||||
# are not set in the shell environment.
|
||||
|
||||
# To override these values, set the shell environment variables.
|
||||
JUPYTERHUB_VERSION=0.9.2
|
||||
JUPYTERHUB_VERSION=0.9.4
|
||||
|
||||
# Name of Docker machine
|
||||
DOCKER_MACHINE_NAME=jupyterhub
|
||||
@ -16,7 +16,7 @@ DOCKER_MACHINE_NAME=jupyterhub
|
||||
DOCKER_NETWORK_NAME=jupyterhub-network
|
||||
|
||||
# Single-user Jupyter Notebook server container image
|
||||
DOCKER_NOTEBOOK_IMAGE=jupyter/minimal-notebook:8ccdfc1da8d5
|
||||
DOCKER_NOTEBOOK_IMAGE=jupyter/base-notebook
|
||||
|
||||
# the local image we use, after pinning jupyterhub version
|
||||
LOCAL_NOTEBOOK_IMAGE=jupyterhub-user
|
||||
|
@ -11,11 +11,11 @@ RUN /opt/conda/bin/conda install -yq psycopg2=2.7 && \
|
||||
dockerspawner==0.9.*
|
||||
|
||||
# Copy TLS certificate and key
|
||||
ENV SSL_CERT /srv/jupyterhub/secrets/jupyterhub.crt
|
||||
ENV SSL_KEY /srv/jupyterhub/secrets/jupyterhub.key
|
||||
COPY ./secrets/*.crt $SSL_CERT
|
||||
COPY ./secrets/*.key $SSL_KEY
|
||||
RUN chmod 700 /srv/jupyterhub/secrets && \
|
||||
chmod 600 /srv/jupyterhub/secrets/*
|
||||
#ENV SSL_CERT /srv/jupyterhub/secrets/jupyterhub.crt
|
||||
#ENV SSL_KEY /srv/jupyterhub/secrets/jupyterhub.key
|
||||
#COPY ./secrets/*.crt $SSL_CERT
|
||||
#COPY ./secrets/*.key $SSL_KEY
|
||||
#RUN chmod 700 /srv/jupyterhub/secrets && \
|
||||
# chmod 600 /srv/jupyterhub/secrets/*
|
||||
|
||||
COPY ./userlist /srv/jupyterhub/userlist
|
||||
|
14
Makefile
14
Makefile
@ -38,14 +38,14 @@ userlist:
|
||||
@exit 1
|
||||
|
||||
# Do not require cert/key files if SECRETS_VOLUME defined
|
||||
secrets_volume = $(shell echo $(SECRETS_VOLUME))
|
||||
ifeq ($(secrets_volume),)
|
||||
cert_files=secrets/jupyterhub.crt secrets/jupyterhub.key
|
||||
else
|
||||
cert_files=
|
||||
endif
|
||||
#secrets_volume = $(shell echo $(SECRETS_VOLUME))
|
||||
#ifeq ($(secrets_volume),)
|
||||
# cert_files=secrets/jupyterhub.crt secrets/jupyterhub.key
|
||||
#else
|
||||
# cert_files=
|
||||
#endif
|
||||
|
||||
check-files: userlist $(cert_files) secrets/oauth.env secrets/postgres.env
|
||||
#check-files: userlist $(cert_files) secrets/oauth.env secrets/postgres.env
|
||||
|
||||
pull:
|
||||
docker pull $(DOCKER_NOTEBOOK_IMAGE)
|
||||
|
@ -35,7 +35,7 @@ services:
|
||||
# Bind Docker volume on host for JupyterHub database and cookie secrets
|
||||
- "data:${DATA_VOLUME_CONTAINER}"
|
||||
ports:
|
||||
- "443:443"
|
||||
- "8000:8000"
|
||||
links:
|
||||
- hub-db
|
||||
environment:
|
||||
|
@ -35,7 +35,11 @@ notebook_dir = os.environ.get('DOCKER_NOTEBOOK_DIR') or '/home/jovyan/work'
|
||||
c.DockerSpawner.notebook_dir = notebook_dir
|
||||
# Mount the real user's Docker volume on the host to the notebook user's
|
||||
# notebook directory in the container
|
||||
c.DockerSpawner.volumes = { 'jupyterhub-user-{username}': notebook_dir }
|
||||
|
||||
# c.DockerSpawner.volumes = { 'jupyterhub-user-{username}': notebook_dir }
|
||||
c.DockerSpawner.volumes = { 'jupyterhub-user-{username}': notebook_dir, # this connects volumes
|
||||
'/home/michael/repos/packages/lyricalart':'/home/jovyan/work/shared' }
|
||||
|
||||
# volume_driver is no longer a keyword argument to create_container()
|
||||
# c.DockerSpawner.extra_create_kwargs.update({ 'volume_driver': 'local' })
|
||||
# Remove containers once they are stopped
|
||||
@ -45,12 +49,12 @@ c.DockerSpawner.debug = True
|
||||
|
||||
# User containers will access hub by container name on the Docker network
|
||||
c.JupyterHub.hub_ip = 'jupyterhub'
|
||||
c.JupyterHub.hub_port = 8080
|
||||
#c.JupyterHub.hub_port = 8001
|
||||
|
||||
# TLS config
|
||||
c.JupyterHub.port = 443
|
||||
c.JupyterHub.ssl_key = os.environ['SSL_KEY']
|
||||
c.JupyterHub.ssl_cert = os.environ['SSL_CERT']
|
||||
#c.JupyterHub.port = 8000
|
||||
#c.JupyterHub.ssl_key = os.environ['SSL_KEY']
|
||||
#c.JupyterHub.ssl_cert = os.environ['SSL_CERT']
|
||||
|
||||
# Authenticate users with GitHub OAuth
|
||||
c.JupyterHub.authenticator_class = 'oauthenticator.GitHubOAuthenticator'
|
||||
|
Loading…
Reference in New Issue
Block a user