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:
Min RK
2018-08-28 14:00:43 +02:00
parent 49a8a6f8f0
commit 2bf23f0b28
3 changed files with 49 additions and 10 deletions

View File

@@ -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)