changes to default config.
This commit is contained in:
parent
5e48f8e431
commit
3c78070359
1
.env
1
.env
@ -41,3 +41,4 @@ DOCKER_SPAWN_CMD=start-singleuser.sh
|
|||||||
# you can print the password for this hub-admin user with 'bash show_login.sh'
|
# you can print the password for this hub-admin user with 'bash show_login.sh'
|
||||||
USERNAME=hub-admin
|
USERNAME=hub-admin
|
||||||
PASSWORD_LENGTH=6
|
PASSWORD_LENGTH=6
|
||||||
|
HUB_LOC=/home/pilosovm/hub
|
||||||
|
@ -8,6 +8,12 @@ RUN /opt/conda/bin/conda install -yq psycopg2=2.7 && \
|
|||||||
/opt/conda/bin/conda clean -tipsy && \
|
/opt/conda/bin/conda clean -tipsy && \
|
||||||
/opt/conda/bin/pip install --no-cache-dir \
|
/opt/conda/bin/pip install --no-cache-dir \
|
||||||
oauthenticator==0.8.*
|
oauthenticator==0.8.*
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
|
vim
|
||||||
|
|
||||||
|
RUN apt-get clean && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN pip install jupyterhub-hashauthenticator git+https://github.com/jupyterhub/dockerspawner.git@master
|
RUN pip install jupyterhub-hashauthenticator git+https://github.com/jupyterhub/dockerspawner.git@master
|
||||||
|
|
||||||
|
@ -44,7 +44,9 @@ class MyDockerSpawner(DockerSpawner):
|
|||||||
'mode': 'rw', # or ro for read-only
|
'mode': 'rw', # or ro for read-only
|
||||||
}
|
}
|
||||||
if self.user.name == 'hub-admin': # if admin, allow userlist access
|
if self.user.name == 'hub-admin': # if admin, allow userlist access
|
||||||
self.volumes[os.path.join(pwd,'userlist')] = { 'bind': '/home/jovyan/userlist',
|
self.volumes['%s/userlist'%(os.environ['HUB_LOC'])] = { 'bind': '/home/jovyan/userlist',
|
||||||
|
'mode': 'rw' }
|
||||||
|
self.volumes['%s/jupyterhub_config.py'%(os.environ['HUB_LOC'])] = { 'bind': '/home/jovyan/jupyterhub_config.py',
|
||||||
'mode': 'rw' }
|
'mode': 'rw' }
|
||||||
return super().start()
|
return super().start()
|
||||||
|
|
||||||
|
1
setup.sh
1
setup.sh
@ -7,6 +7,7 @@ echo "hub-admin admin shared" > userlist
|
|||||||
mkdir secrets
|
mkdir secrets
|
||||||
make secrets/oauth.env
|
make secrets/oauth.env
|
||||||
make secrets/postgres.env
|
make secrets/postgres.env
|
||||||
|
echo "HUB_LOC=$(pwd)" >> .env
|
||||||
|
|
||||||
source .env
|
source .env
|
||||||
# show what is needed to be added to /etc/nginx/sites-enabled/hub.conf
|
# show what is needed to be added to /etc/nginx/sites-enabled/hub.conf
|
||||||
|
Loading…
Reference in New Issue
Block a user