The `http` declaration doesn't go in the main config file

This commit is contained in:
Jean Froment 2020-09-11 13:03:38 +02:00
parent e99e37f74e
commit e09eddadc5
4 changed files with 9 additions and 9 deletions

View File

@ -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

View File

@ -0,0 +1,5 @@
http:
middlewares:
common-auth:
basicAuth:
usersFile: "http_auth"

View File

@ -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"

View File

@ -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... *****"