traefik: Allow to define additional entrypoints
This patch allows users to easily add new entrypoints on different ports. Such functionality comes in handy when having to deploy something like a docker registry on the same host but on a different port while still utilizing a shared certificate.
This commit is contained in:
parent
d2666eb72c
commit
19eb9e1196
2 changed files with 15 additions and 0 deletions
|
@ -76,6 +76,15 @@ traefik_dynamic_conf:
|
||||||
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
|
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
|
||||||
- TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305
|
- TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305
|
||||||
|
|
||||||
|
# This config allows to add new entrypoints to traefik which are also automatically exposed / the port is automatically allocated.
|
||||||
|
# Can be used in cases where traefik needs to be used as a proxy because of the certificates it holds. Eg. gitlab registry on the
|
||||||
|
# same domain, where we want to use the existing certificate for the registry too.
|
||||||
|
#
|
||||||
|
# Example entry:
|
||||||
|
# - name: gitlabregistry
|
||||||
|
# port: 5050
|
||||||
|
traefik_additional_entrypoints: []
|
||||||
|
|
||||||
# Enables debug log level
|
# Enables debug log level
|
||||||
traefik_debug: false
|
traefik_debug: false
|
||||||
|
|
||||||
|
|
|
@ -95,6 +95,9 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
- "443:443"
|
- "443:443"
|
||||||
|
{% for entrypoint in traefik_additional_entrypoints %}
|
||||||
|
- "{{ entrypoint.port }}:{{ entrypoint.port }}"
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- "{{ traefik_acme_location }}:/etc/traefik/acme"
|
- "{{ traefik_acme_location }}:/etc/traefik/acme"
|
||||||
|
@ -105,6 +108,9 @@ services:
|
||||||
command:
|
command:
|
||||||
- "--entryPoints.web.address=:80"
|
- "--entryPoints.web.address=:80"
|
||||||
- "--entryPoints.websecure.address=:443"
|
- "--entryPoints.websecure.address=:443"
|
||||||
|
{% for entrypoint in traefik_additional_entrypoints %}
|
||||||
|
- "--entryPoints.{{ entrypoint.name }}.address=:{{ entrypoint.port }}"
|
||||||
|
{% endfor %}
|
||||||
- "--accesslog={{ traefik_access_log_enabled | bool | lower }}"
|
- "--accesslog={{ traefik_access_log_enabled | bool | lower }}"
|
||||||
{% if traefik_dynamic_conf != omit %}
|
{% if traefik_dynamic_conf != omit %}
|
||||||
- "--providers.file.directory=/etc/traefik/dynamic_conf"
|
- "--providers.file.directory=/etc/traefik/dynamic_conf"
|
||||||
|
|
Loading…
Add table
Reference in a new issue