mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Allow extending traefik dynamic config
This commit is contained in:
@@ -53,7 +53,7 @@ c.JupyterHub.hub_port = 15001
|
||||
|
||||
c.TraefikTomlProxy.should_start = False
|
||||
|
||||
dynamic_conf_file_path = os.path.join(INSTALL_PREFIX, 'state', 'rules.toml')
|
||||
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
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ PrivateTmp=yes
|
||||
PrivateDevices=yes
|
||||
ProtectKernelTunables=yes
|
||||
ProtectKernelModules=yes
|
||||
ReadWritePaths={install_prefix}/state/rules.toml
|
||||
ReadWritePaths={install_prefix}/state/rules
|
||||
ReadWritePaths={install_prefix}/state/acme.json
|
||||
WorkingDirectory={install_prefix}/state
|
||||
ExecStart={install_prefix}/hub/bin/traefik \
|
||||
|
||||
@@ -131,7 +131,7 @@ def ensure_traefik_config(state_dir):
|
||||
os.fchmod(f.fileno(), 0o600)
|
||||
toml.dump(new_toml, f)
|
||||
|
||||
with open(os.path.join(state_dir, "rules.toml"), "w") as f:
|
||||
with open(os.path.join(state_dir, 'rules', "rules.toml"), "w") as f:
|
||||
os.fchmod(f.fileno(), 0o600)
|
||||
|
||||
# ensure acme.json exists and is private
|
||||
|
||||
@@ -70,5 +70,5 @@ entryPoint = "https"
|
||||
{% endif %}
|
||||
|
||||
[file]
|
||||
filename = "rules.toml"
|
||||
directory = "rules"
|
||||
watch = true
|
||||
|
||||
Reference in New Issue
Block a user