mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
put config in a single config directory
instead of top-level files - ensure directory is private - both tljh and jupyterhub config go in there - move old config.yaml to new location at install time
This commit is contained in:
@@ -8,7 +8,7 @@ from glob import glob
|
||||
|
||||
from systemdspawner import SystemdSpawner
|
||||
from tljh import user, configurer
|
||||
from tljh.config import INSTALL_PREFIX, USER_ENV_PREFIX
|
||||
from tljh.config import INSTALL_PREFIX, USER_ENV_PREFIX, CONFIG_DIR
|
||||
|
||||
|
||||
class CustomSpawner(SystemdSpawner):
|
||||
@@ -50,6 +50,6 @@ configurer.apply_config(config_overrides, c)
|
||||
|
||||
# Load arbitrary .py config files if they exist.
|
||||
# This is our escape hatch
|
||||
extra_configs = sorted(glob(os.path.join(INSTALL_PREFIX, 'jupyterhub_config.d', '*.py')))
|
||||
extra_configs = sorted(glob(os.path.join(CONFIG_DIR, 'jupyterhub_config.d', '*.py')))
|
||||
for ec in extra_configs:
|
||||
load_subconfig(ec)
|
||||
|
||||
Reference in New Issue
Block a user