mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-15 05:53:00 +00:00
simplify singleuser-service examples
now that service env vars are respected
This commit is contained in:
@@ -2,11 +2,8 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
export JUPYTERHUB_API_TOKEN=super-secret
|
export JUPYTERHUB_API_TOKEN=super-secret
|
||||||
|
export JUPYTERHUB_SERVICE_URL=http://127.0.0.1:9999
|
||||||
|
export JUPYTERHUB_SERVICE_NAME=shared-notebook
|
||||||
|
|
||||||
jupyterhub-singleuser \
|
jupyterhub-singleuser \
|
||||||
--cookie-name=jupyterhub-services \
|
--group='shared'
|
||||||
--port=9999 \
|
|
||||||
--group='shared' \
|
|
||||||
--base-url=/services/shared-notebook \
|
|
||||||
--hub-prefix=/hub/ \
|
|
||||||
--hub-api-url=http://127.0.0.1:8081/hub/api/
|
|
||||||
|
@@ -14,11 +14,9 @@ c.JupyterHub.load_groups = {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
hub_ip = '127.0.0.1'
|
|
||||||
hub_api_port = 8081
|
|
||||||
service_name = 'shared-notebook'
|
service_name = 'shared-notebook'
|
||||||
group_name = 'shared'
|
|
||||||
service_port = 9999
|
service_port = 9999
|
||||||
|
group_name = 'shared'
|
||||||
|
|
||||||
# start the notebook server as a service
|
# start the notebook server as a service
|
||||||
c.JupyterHub.services = [
|
c.JupyterHub.services = [
|
||||||
@@ -27,12 +25,8 @@ c.JupyterHub.services = [
|
|||||||
'url': 'http://127.0.0.1:{}'.format(service_port),
|
'url': 'http://127.0.0.1:{}'.format(service_port),
|
||||||
'command': [
|
'command': [
|
||||||
'jupyterhub-singleuser',
|
'jupyterhub-singleuser',
|
||||||
'--cookie-name=jupyterhub-services',
|
'--group=shared',
|
||||||
'--port={}'.format(service_port),
|
'--debug',
|
||||||
'--group={}'.format(group_name),
|
],
|
||||||
'--base-url=/services/{}'.format(service_name),
|
|
||||||
'--hub-prefix=/hub/',
|
|
||||||
'--hub-api-url=http://{}:{}/hub/api'.format(hub_ip, hub_api_port),
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
Reference in New Issue
Block a user