Migrate conf file to yaml ; add dynamix configuration

This commit is contained in:
2021-10-05 11:33:23 +02:00
parent c9a39507fb
commit 66f3d36482
3 changed files with 45 additions and 35 deletions

View File

@@ -1,32 +0,0 @@
[global]
checkNewVersion=true
sendAnonymousUsage=false
[accesslog]
[log]
level = "WARNING"
[api]
dashboard = true
[entryPoints]
[entryPoints.web]
address = ":80"
[entryPoints.web.http]
[entryPoints.web.http.redirections]
[entryPoints.web.http.redirections.entryPoint]
to = "websecure"
scheme = "https"
[entryPoints.websecure]
address = ":443"
[certificatesResolvers.myresolver.acme]
email = "florestan@bredow.fr"
storage = "acme.json"
[certificatesResolvers.myresolver.acme.httpChallenge]
entryPoint = "web"
[providers.docker]
exposedByDefault = false
network = "web"

41
conf/traefik.yml Normal file
View File

@@ -0,0 +1,41 @@
global:
checkNewVersion: false
sendAnonymousUsage: false
# Log les accès sur la sortie standard.
accesslog: {}
log:
level: "WARN"
api:
dashboard: true
entryPoints:
web:
address: ":80"
http:
redirections:
entryPoint:
to: "websecure"
scheme: "https"
websecure:
enablehttp3: true
address: ":443"
certificatesResolvers:
myresolver:
acme:
email: "florestan.bredow@supagro.fr"
storage: "acme.json"
httpChallenge:
entryPoint: "web"
providers:
file:
directory: "/etc/traefik/dynamic"
providers:
docker:
exposedBydefault: false
network: "web"

View File

@@ -2,7 +2,8 @@ version: '3.8'
services:
traefik:
image: traefik:2.3
image: traefik:2.5
restart: always
ports:
- "80:80"
- "443:443"
@@ -10,9 +11,9 @@ services:
- web
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./conf/traefik.toml:/etc/traefik/traefik.toml:ro
- ./conf/traefik.yml:/etc/traefik/traefik.yml:ro
- ./conf/acme.json:/acme.json
- ./conf/custom:/etc/traefik/custom:ro
- ./conf/dynamic:/etc/traefik/dynamic:ro
labels:
- traefik.enable=true
- traefik.http.routers.dashboard.rule=Host(`${HOSTNAME}`)