add JUPYTERHUB_IP env

This commit is contained in:
2024-01-14 23:42:48 +08:00
parent 159f56455f
commit 2ca76bf252
2 changed files with 3 additions and 1 deletions

View File

@@ -35,6 +35,8 @@ services:
DOCKER_NOTEBOOK_IMAGE: hotwa/notebook:latest DOCKER_NOTEBOOK_IMAGE: hotwa/notebook:latest
# Notebook directory inside user image # Notebook directory inside user image
DOCKER_NOTEBOOK_DIR: /home/jovyan/work DOCKER_NOTEBOOK_DIR: /home/jovyan/work
# add tailscale ip
JUPYTERHUB_IP: 0.0.0.0
volumes: volumes:
jupyterhub-data: jupyterhub-data:

View File

@@ -39,7 +39,7 @@ c.DockerSpawner.remove = True
c.DockerSpawner.debug = True c.DockerSpawner.debug = True
# User containers will access hub by container name on the Docker network # User containers will access hub by container name on the Docker network
c.JupyterHub.hub_ip = "jupyterhub" c.JupyterHub.hub_ip = os.environ.get('JUPYTERHUB_IP', '0.0.0.0')
c.JupyterHub.hub_port = 8080 c.JupyterHub.hub_port = 8080
# Persist hub data on volume mounted inside container # Persist hub data on volume mounted inside container