Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Tianhao-Gu committed Nov 12, 2024
1 parent ef8eb6e commit 9a6bb4f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions config/jupyterhub_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
Refer to the JupyterHub documentation for more information:
https://jupyterhub.readthedocs.io/en/latest/tutorial/getting-started/config-basics.html
https://jupyterhub.readthedocs.io/en/stable/reference/config-reference.html
Refer to DockerSpawner documentation for dockerspawner settings information:
https://jupyterhub-dockerspawner.readthedocs.io/en/latest/api/index.html#dockerspawner-api
"""

import os
Expand Down Expand Up @@ -53,15 +56,13 @@
c.DockerSpawner.http_timeout = 120 # 2 minutes (default is 30 seconds)
c.DockerSpawner.start_timeout = 300 # 5 minutes (default is 60 seconds)


# The network name that Docker containers will use to communicate
network_name = os.environ.get('NETWORK_NAME')
if network_name:
c.DockerSpawner.network_name = network_name
c.DockerSpawner.use_internal_ip = True
environment = os.environ.get('ENVIRONMENT', 'prod').lower()
# for troubleshooting purposes, keep the container in non-prod environment
# ref: https://jupyterhub-dockerspawner.readthedocs.io/en/latest/api/index.html#dockerspawner.DockerSpawner.remove
c.DockerSpawner.remove = environment != 'dev'
c.DockerSpawner.debug = True

Expand Down

0 comments on commit 9a6bb4f

Please sign in to comment.