chore(traefik): prefix all traefi vars with traefik_
This commit is contained in:
parent
d0ae0a4df9
commit
13eb79803f
7 changed files with 58 additions and 58 deletions
|
|
@ -1,15 +1,15 @@
|
|||
{% set dashboard_ssl = use_ssl_dashboard | default(use_ssl) %}
|
||||
{% set dashboard_ssl = traefik_use_ssl_dashboard | default(traefik_use_ssl) %}
|
||||
http:
|
||||
routers:
|
||||
dashboard:
|
||||
rule: "Host(`{{ dashboard_domain }}`)"
|
||||
rule: "Host(`{{ traefik_dashboard_domain }}`)"
|
||||
service: api@internal
|
||||
entryPoints:
|
||||
- {{ 'websecure' if dashboard_ssl else 'web' }}
|
||||
{% if dashboard_ssl %}
|
||||
tls:
|
||||
{% if cert_mode == 'acme' %}
|
||||
certResolver: {{ ssl_cert_resolver }}
|
||||
{% if traefik_cert_mode == 'acme' %}
|
||||
certResolver: {{ traefik_ssl_cert_resolver }}
|
||||
{% else %}
|
||||
{}
|
||||
{% endif %}
|
||||
|
|
|
|||
|
|
@ -3,26 +3,26 @@ services:
|
|||
image: traefik:latest
|
||||
container_name: traefik
|
||||
restart: always
|
||||
{% if cert_mode == 'acme' %}
|
||||
{% if traefik_cert_mode == 'acme' %}
|
||||
environment:
|
||||
RFC2136_NAMESERVER: "{{ acme_dns_nameserver }}"
|
||||
RFC2136_TSIG_ALGORITHM: "{{ acme_tsig_algorithm }}"
|
||||
RFC2136_TSIG_KEY: "{{ acme_tsig_key }}"
|
||||
RFC2136_TSIG_SECRET: "{{ acme_tsig_secret }}"
|
||||
RFC2136_PROPAGATION_TIMEOUT: "{{ acme_propagation_timeout }}"
|
||||
RFC2136_POLLING_INTERVAL: "{{ acme_polling_interval }}"
|
||||
RFC2136_TTL: "{{ acme_ttl }}"
|
||||
RFC2136_NAMESERVER: "{{ traefik_acme_dns_nameserver }}"
|
||||
RFC2136_TSIG_ALGORITHM: "{{ traefik_acme_tsig_algorithm }}"
|
||||
RFC2136_TSIG_KEY: "{{ traefik_acme_tsig_key }}"
|
||||
RFC2136_TSIG_SECRET: "{{ traefik_acme_tsig_secret }}"
|
||||
RFC2136_PROPAGATION_TIMEOUT: "{{ traefik_acme_propagation_timeout }}"
|
||||
RFC2136_POLLING_INTERVAL: "{{ traefik_acme_polling_interval }}"
|
||||
RFC2136_TTL: "{{ traefik_acme_ttl }}"
|
||||
{% endif %}
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
{% if enable_dashboard and not dashboard_domain %}
|
||||
{% if traefik_enable_dashboard and not traefik_dashboard_domain %}
|
||||
- "8080:8080"
|
||||
{% endif %}
|
||||
volumes:
|
||||
- {{ docker_volume_dir }}/traefik.yml:/traefik.yml:ro
|
||||
- {{ docker_volume_dir }}/config:/config:ro
|
||||
{% if cert_mode == 'acme' %}
|
||||
{% if traefik_cert_mode == 'acme' %}
|
||||
- {{ docker_volume_dir }}/letsencrypt:/letsencrypt
|
||||
{% endif %}
|
||||
{% if traefik_mode == 'backend' %}
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
{% if enable_dashboard %}
|
||||
{% if traefik_enable_dashboard %}
|
||||
api:
|
||||
dashboard: true
|
||||
insecure: true
|
||||
{% endif %}
|
||||
|
||||
{% if enable_access_logs %}
|
||||
{% if traefik_enable_access_logs %}
|
||||
accessLog:
|
||||
format: {{ access_log_format }}
|
||||
format: {{ traefik_access_log_format }}
|
||||
{% endif %}
|
||||
|
||||
entryPoints:
|
||||
web:
|
||||
address: ":80"
|
||||
{% if use_ssl %}
|
||||
{% if traefik_use_ssl %}
|
||||
http:
|
||||
redirections:
|
||||
entryPoint:
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@ http:
|
|||
rule: "Host(`{{ service.domain }}`)"
|
||||
service: {{ service.name }}-service
|
||||
entryPoints:
|
||||
- {{ 'websecure' if use_ssl else 'web' }}
|
||||
{% if use_ssl %}
|
||||
- {{ 'websecure' if traefik_use_ssl else 'web' }}
|
||||
{% if traefik_use_ssl %}
|
||||
tls:
|
||||
{% if cert_mode == 'acme' %}
|
||||
certResolver: {{ ssl_cert_resolver }}
|
||||
{% if traefik_cert_mode == 'acme' %}
|
||||
certResolver: {{ traefik_ssl_cert_resolver }}
|
||||
{% else %}
|
||||
{}
|
||||
{% endif %}
|
||||
|
|
@ -23,12 +23,12 @@ http:
|
|||
passHostHeader: true
|
||||
servers:
|
||||
- url: "{{ service.protocol }}://{{ service.backend_host }}:{{ service.port }}"
|
||||
{% if service.protocol == 'https' and cert_mode == 'selfsigned' %}
|
||||
{% if service.protocol == 'https' and traefik_cert_mode == 'selfsigned' %}
|
||||
serversTransport: insecure-transport
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if cert_mode == 'selfsigned' %}
|
||||
{% if traefik_cert_mode == 'selfsigned' %}
|
||||
serversTransports:
|
||||
insecure-transport:
|
||||
insecureSkipVerify: true
|
||||
|
|
|
|||
|
|
@ -1,23 +1,23 @@
|
|||
log:
|
||||
level: {{ log_level }}
|
||||
level: {{ traefik_log_level }}
|
||||
|
||||
{% if enable_dashboard %}
|
||||
{% if traefik_enable_dashboard %}
|
||||
api:
|
||||
dashboard: true
|
||||
{% if not dashboard_domain %}
|
||||
{% if not traefik_dashboard_domain %}
|
||||
insecure: true
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if enable_access_logs %}
|
||||
{% if traefik_enable_access_logs %}
|
||||
accessLog:
|
||||
format: {{ access_log_format }}
|
||||
format: {{ traefik_access_log_format }}
|
||||
{% endif %}
|
||||
|
||||
entryPoints:
|
||||
web:
|
||||
address: ":80"
|
||||
{% if use_ssl %}
|
||||
{% if traefik_use_ssl %}
|
||||
http:
|
||||
redirections:
|
||||
entryPoint:
|
||||
|
|
@ -38,19 +38,19 @@ providers:
|
|||
exposedByDefault: false
|
||||
{% endif %}
|
||||
|
||||
{% if use_ssl and cert_mode == 'acme' %}
|
||||
{% if traefik_use_ssl and traefik_cert_mode == 'acme' %}
|
||||
certificatesResolvers:
|
||||
{{ ssl_cert_resolver }}:
|
||||
{{ traefik_ssl_cert_resolver }}:
|
||||
acme:
|
||||
email: {{ ssl_email }}
|
||||
email: {{ traefik_ssl_email }}
|
||||
storage: /letsencrypt/acme.json
|
||||
dnsChallenge:
|
||||
provider: rfc2136
|
||||
resolvers:
|
||||
- "{{ acme_dns_nameserver }}"
|
||||
- "{{ traefik_acme_dns_nameserver }}"
|
||||
{% endif %}
|
||||
|
||||
{% if use_ssl %}
|
||||
{% if traefik_use_ssl %}
|
||||
tls:
|
||||
options:
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue