mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
update for traefik v2, treafik-proxy v1
- tls config is no longer allowed in static config file, add separate dynamic config - no longer need to persist auth config ourselves (TraefikProxy handles this) - make sure to reload proxy before reloading hub in tests
This commit is contained in:
@@ -5,13 +5,12 @@ JupyterHub config for the littlest jupyterhub.
|
||||
import os
|
||||
from glob import glob
|
||||
|
||||
from jupyterhub_traefik_proxy import TraefikTomlProxy
|
||||
|
||||
from tljh import configurer
|
||||
from tljh.config import CONFIG_DIR, INSTALL_PREFIX, USER_ENV_PREFIX
|
||||
from tljh.user_creating_spawner import UserCreatingSpawner
|
||||
from tljh.utils import get_plugin_manager
|
||||
|
||||
c = get_config() # noqa
|
||||
c.JupyterHub.spawner_class = UserCreatingSpawner
|
||||
|
||||
# leave users running when the Hub restarts
|
||||
@@ -20,11 +19,11 @@ c.JupyterHub.cleanup_servers = False
|
||||
# Use a high port so users can try this on machines with a JupyterHub already present
|
||||
c.JupyterHub.hub_port = 15001
|
||||
|
||||
c.TraefikTomlProxy.should_start = False
|
||||
c.TraefikProxy.should_start = False
|
||||
|
||||
dynamic_conf_file_path = os.path.join(INSTALL_PREFIX, "state", "rules", "rules.toml")
|
||||
c.TraefikTomlProxy.toml_dynamic_config_file = dynamic_conf_file_path
|
||||
c.JupyterHub.proxy_class = TraefikTomlProxy
|
||||
c.TraefikFileProviderProxy.dynamic_config_file = dynamic_conf_file_path
|
||||
c.JupyterHub.proxy_class = "traefik_file"
|
||||
|
||||
c.SystemdSpawner.extra_paths = [os.path.join(USER_ENV_PREFIX, "bin")]
|
||||
c.SystemdSpawner.default_shell = "/bin/bash"
|
||||
|
||||
Reference in New Issue
Block a user