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:
25
tljh/traefik-dynamic.toml.tpl
Normal file
25
tljh/traefik-dynamic.toml.tpl
Normal file
@@ -0,0 +1,25 @@
|
||||
# traefik.toml dynamic config (mostly TLS)
|
||||
# dynamic config in the static config file will be ignored
|
||||
{% if https['enabled'] %}
|
||||
[tls]
|
||||
[tls.options.default]
|
||||
minVersion = "VersionTLS12"
|
||||
|
||||
{% if https['tls']['cert'] %}
|
||||
[tls.stores.default.defaultCertificate]
|
||||
certFile = "{{ https['tls']['cert'] }}"
|
||||
keyFile = "{{ https['tls']['key'] }}"
|
||||
{% endif %}
|
||||
|
||||
{% if https['letsencrypt']['email'] and https['letsencrypt']['domains'] %}
|
||||
[tls.stores.default.defaultGeneratedCert]
|
||||
resolver = "letsencrypt"
|
||||
[tls.stores.default.defaultGeneratedCert.domain]
|
||||
main = "{{ https['letsencrypt']['domains'][0] }}"
|
||||
sans = [
|
||||
{% for domain in https['letsencrypt']['domains'][1:] %}
|
||||
"{{ domain }}",
|
||||
{% endfor %}
|
||||
]
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user