Fixed: Nginx WebSocket configuration causing Single User Servers to miss out api requests
This commit is contained in:
@@ -65,16 +65,24 @@ port = int(os.environ.get("JUPYTERHUB_PORT", "8000"))
|
||||
base_url = os.environ.get("JUPYTERHUB_BASE_URL", "/jupyter/")
|
||||
c.JupyterHub.bind_url = f"http://0.0.0.0:{port}{base_url}"
|
||||
|
||||
# Database configuration
|
||||
c.JupyterHub.db_url = f"postgresql://{os.environ['POSTGRES_USER']}:{os.environ['POSTGRES_PASSWORD']}@{os.environ['POSTGRES_HOST']}:5432/{os.environ['POSTGRES_DB']}"
|
||||
# c.JupyterHub.db_url = 'sqlite:///jupyterhub.sqlite'
|
||||
# Mission Critical this should be the service name not the container name
|
||||
# without this option containers cant reach the api endpoint
|
||||
# this is due to nginx external rounting and might help
|
||||
# migration this project to a cluster setup
|
||||
c.JupyterHub.hub_connect_ip = "jupyterhub"
|
||||
|
||||
# Database configuration
|
||||
p_user = os.environ["POSTGRES_USER"]
|
||||
p_pass = os.environ["POSTGRES_PASSWORD"]
|
||||
p_host = os.environ["POSTGRES_HOST"]
|
||||
p_db = os.environ["POSTGRES_DB"]
|
||||
c.JupyterHub.db_url = f"postgresql://{p_user}:{p_pass}@{p_host}:5432/{p_db}"
|
||||
# c.JupyterHub.db_url = 'sqlite:///jupyterhub.sqlite'
|
||||
|
||||
# Authenticator configuration - NativeAuthenticator
|
||||
c.JupyterHub.authenticator_class = NativeAuthenticator
|
||||
|
||||
# Native Authenticator settings
|
||||
# c.NativeAuthenticator.create_system_users = True
|
||||
c.NativeAuthenticator.minimum_password_length = int(
|
||||
os.environ.get("NATIVE_AUTH_MIN_PASSWORD_LENGTH", "8")
|
||||
)
|
||||
|
Reference in New Issue
Block a user