From 930268b6c0d68a0e90f39686ca7d39e8332999b2 Mon Sep 17 00:00:00 2001 From: Jean Froment Date: Fri, 11 Sep 2020 13:12:59 +0200 Subject: [PATCH] Fix path in file provider for common-auth middleware --- init.sh | 8 ++++++-- traefik/file-provider.yml | 2 +- update-all.sh | 1 - 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/init.sh b/init.sh index 632e834..bd573a0 100755 --- a/init.sh +++ b/init.sh @@ -1,6 +1,10 @@ #!/bin/bash echo "[$0] Initializing..." -cp .env.sample .env -echo "[$0] Please edit .env file" +docker network create traefik-network || true +if [[ ! -f .env ]]; then + cp .env.sample .env + echo "[$0] Please edit .env file" +fi +echo "[$0] Done." exit 0 \ No newline at end of file diff --git a/traefik/file-provider.yml b/traefik/file-provider.yml index c1239fa..7978444 100644 --- a/traefik/file-provider.yml +++ b/traefik/file-provider.yml @@ -2,4 +2,4 @@ http: middlewares: common-auth: basicAuth: - usersFile: "http_auth" \ No newline at end of file + usersFile: "/etc/traefik/http_auth" \ No newline at end of file diff --git a/update-all.sh b/update-all.sh index 6dcbd11..17d6098 100755 --- a/update-all.sh +++ b/update-all.sh @@ -3,7 +3,6 @@ # Create/update http_auth file according to values in .env file source .env echo "${HTTP_USER}:${HTTP_PASSWORD}" > traefik/http_auth -docker network create traefik-network || true echo "[$0] ***** Pulling all images... *****" docker-compose pull