From e09eddadc506af7fb58f1ea88bd2d50c5a2a7e2f Mon Sep 17 00:00:00 2001 From: Jean Froment Date: Fri, 11 Sep 2020 13:03:38 +0200 Subject: [PATCH] The `http` declaration doesn't go in the main config file --- docker-compose.yml | 3 +-- traefik/file-provider.yml | 5 +++++ traefik.yml => traefik/traefik.yml | 8 ++------ update-all.sh | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) create mode 100644 traefik/file-provider.yml rename traefik.yml => traefik/traefik.yml (82%) diff --git a/docker-compose.yml b/docker-compose.yml index fda0312..364b9ac 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,8 +11,7 @@ services: - "443:443" volumes: - /var/run/docker.sock:/var/run/docker.sock - - ./traefik.yml:/etc/traefik/traefik.yaml:ro - - ./http_auth:/http_auth + - ./traefik:/etc/traefik labels: - "traefik.enable=true" # HTTP to HTTPS redirection diff --git a/traefik/file-provider.yml b/traefik/file-provider.yml new file mode 100644 index 0000000..c1239fa --- /dev/null +++ b/traefik/file-provider.yml @@ -0,0 +1,5 @@ +http: + middlewares: + common-auth: + basicAuth: + usersFile: "http_auth" \ No newline at end of file diff --git a/traefik.yml b/traefik/traefik.yml similarity index 82% rename from traefik.yml rename to traefik/traefik.yml index 2ea7e55..1863682 100644 --- a/traefik.yml +++ b/traefik/traefik.yml @@ -6,6 +6,8 @@ providers: endpoint: "unix:///var/run/docker.sock" network: "traefik-network" exposedByDefault: false # Only expose explicitly enabled containers + file: + filename: /etc/traefik/file-provider.yml entryPoints: insecure: @@ -20,9 +22,3 @@ certificatesResolvers: httpChallenge: # used during the challenge entryPoint: insecure - -http: - middlewares: - common-auth: - basicAuth: - usersFile: "/http_auth" \ No newline at end of file diff --git a/update-all.sh b/update-all.sh index eabc562..6dcbd11 100755 --- a/update-all.sh +++ b/update-all.sh @@ -2,7 +2,7 @@ # Create/update http_auth file according to values in .env file source .env -echo "${HTTP_USER}:${HTTP_PASSWORD}" > http_auth +echo "${HTTP_USER}:${HTTP_PASSWORD}" > traefik/http_auth docker network create traefik-network || true echo "[$0] ***** Pulling all images... *****"