From e871aef90c61a22d5edcb667643354ad659c0537 Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Tue, 17 Sep 2019 20:10:19 -0400 Subject: [PATCH] First test of Traefik 2.0 --- templates/Joomla/0/docker-compose.yml | 22 +++++++++++++--------- templates/Traefik/1/docker-compose.yml | 10 ++++++---- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/templates/Joomla/0/docker-compose.yml b/templates/Joomla/0/docker-compose.yml index fc8ece3..f27282a 100644 --- a/templates/Joomla/0/docker-compose.yml +++ b/templates/Joomla/0/docker-compose.yml @@ -20,16 +20,20 @@ services: {{- end}} traefik.enable: true ### Start Joomla Segment - traefik.frontend.entryPoints: http,https - traefik.frontend.headers.forceSTSHeader: true - traefik.frontend.headers.referrerPolicy: no-referrer # Security enhancement (Prevents leaking of referer information) - traefik.frontend.headers.SSLRedirect: true - traefik.frontend.headers.STSPreload: true - traefik.frontend.headers.STSSeconds: 15552000 - traefik.frontend.passHostHeader: true - traefik.frontend.rule: Host:${TRAEFIK_HOST} - traefik.port: "80" +# traefik.frontend.entryPoints: http,https +# traefik.frontend.headers.forceSTSHeader: true +# traefik.frontend.headers.referrerPolicy: no-referrer # Security enhancement (Prevents leaking of referer information) +# traefik.frontend.headers.SSLRedirect: true +# traefik.frontend.headers.STSPreload: true +# traefik.frontend.headers.STSSeconds: 15552000 +# traefik.frontend.passHostHeader: true +# traefik.frontend.rule: Host:${TRAEFIK_HOST} +# traefik.port: "80" ### End Joomla Segment + # Might need to include $${service_name} too + traefik.http.routers.$${stack_name}.rule: "Host('${TRAEFIK_HOST}')" + traefik.http.routers.$${stack_name}.entrypoints: "['http','https']" + traefik.http.routers.$${stack_name}.tls.certresolver: "letsencrypt" links: - mysql restart: on-failure diff --git a/templates/Traefik/1/docker-compose.yml b/templates/Traefik/1/docker-compose.yml index a80c39e..0588070 100644 --- a/templates/Traefik/1/docker-compose.yml +++ b/templates/Traefik/1/docker-compose.yml @@ -16,9 +16,10 @@ services: io.rancher.scheduler.affinity:host_label: ${HOST_LABEL} {{- end}} ports: + - "1200:1200" # Traefik Dashboard (Might be temporary) - "22:22" # SSH - #- "80:80" # HTTP - #- "443:443" # HTTPS + - "80:80" # HTTP + - "443:443" # HTTPS - "3306:3306" # MySQL - "19132:19132" # Minecraft restart: always @@ -27,6 +28,7 @@ services: - /etc/localtime:/etc/localtime:ro # Syncronize time of container with the host system - /etc/timezone:/etc/timezone:ro # Syncronize timezone of container with the host system - /Persistent/${DATA_DIR}/Configuration/traefik.toml:/traefik.toml - - /Persistent/${DATA_DIR}/Configuration/ExtraConfig:/ExtraConfig - - /Persistent/${DATA_DIR}/LetsEncrypt:/letsencrypt # For Let's Encrypt certificates + - /Persistent/${DATA_DIR}/Configuration/FileProviders:/FileProviders + - /Persistent/${DATA_DIR}/Certificates:/Certificates + - /Persistent/${DATA_DIR}/Certificates/ACME:/etc/traefik/acme # For Let's Encrypt certificates - /Persistent/${DATA_DIR}/Logs:/external/logs \ No newline at end of file