From b3054288e835539a785bfdf97f709f338b39d00c Mon Sep 17 00:00:00 2001 From: Joshua Newell Date: Mon, 17 Jun 2019 12:48:46 -0400 Subject: [PATCH] add redirect http->https option to traefik proxy config make entryPoints config consistent between proxy and proxy-global --- stack-proxy-global.yml | 4 +++- stack-proxy.yml | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/stack-proxy-global.yml b/stack-proxy-global.yml index a6ec7ff..21046bd 100644 --- a/stack-proxy-global.yml +++ b/stack-proxy-global.yml @@ -50,7 +50,9 @@ services: - --consul.prefix=traefik - --defaultentrypoints=http,https - --entryPoints=Name:https Address::443 TLS - - --entryPoints=Name:http Address::80 + - --entryPoints=Name:http Address::80 # don't force HTTPS + # - --entryPoints=Name:http Address::80 Redirect.EntryPoint:https # force HTTPS + ## optional LetsEncrypt settings # - --acme # - --acme.email=${TRAEFIK_ACME_EMAIL} # # TODO: envvar for email and default domain diff --git a/stack-proxy.yml b/stack-proxy.yml index 52206d4..e6e3714 100644 --- a/stack-proxy.yml +++ b/stack-proxy.yml @@ -36,6 +36,10 @@ services: - --docker.watch - --api - --defaultentrypoints=http,https + - --entryPoints=Name:https Address::443 TLS + - --entryPoints=Name:http Address::80 # don't force HTTPS + # - --entryPoints=Name:http Address::80 Redirect.EntryPoint:https # force HTTPS + ## optional LetsEncrypt settings # - --acme # - --acme.email=${TRAEFIK_ACME_EMAIL} # # TODO: envvar for email and default domain @@ -43,8 +47,6 @@ services: # - --acme.httpchallenge.entrypoint=http # - --acme.onhostrule=true # - --acme.entrypoint=https - # - --entryPoints=Name:https Address::443 TLS - # - --entryPoints=Name:http Address::80 # - --acme.storage=/etc/traefik/acme/acme.json # - --acme.acmelogging # - --acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory