I'm trying to configure traefik logs and I can't get it to work
docker run -d --restart always
-v /var/run/docker.sock:/var/run/docker.sock
-v $PWD/traefik.toml:/traefik.toml
-v $PWD/traefik_dynamic.toml:/traefik_dynamic.toml
-v $PWD/acme.json:/acme.json
-p 80:80
-p 443:443
--network web
--name tradeik
trafficik:v2.9.8
docker-compose.yml
version: "3"
networks:
web:
external: true
internal:
external: false
services:
prd_easydoc_rpa:
image: arpafaceapi:rpafaceap
labels:
- traefik.http.routers.rpa.rule=Host(rpa.teste.com
)
- traefik.http.routers.rpa.tls=true
- traefik.http.routers.rpa.tls.certresolver=lets-encrypt
- trafficik.port=80
networks:
- internal
- web
restart: always
traefik.toml
[entryPoints]
[entryPoints.web]
address=":80"
[entryPoints.web.http.redirections.entryPoint]
to="websecure"
scheme="https"
[entryPoints.websecure]
address=":443"
[api]
dashboard = true
debug = true
[certificatesResolvers.lets-encrypt.acme]
email = "admin@test.com"
storage = "acme.json"
[certificatesResolvers.lets-encrypt.acme.tlsChallenge]
[providers.docker]
watch = true
network = "web"
[providers.file]
filename = "traefik_dynamic.toml"
[accessLog]
filePath = "/var/log/traefik/access.log"
[accessLog.filters]
statusCodes = ["200", "300-302"]
retryAttempts = true
minDuration="10ms"
traefik_dynamic.toml
[http.middlewares.simpleAuth.basicAuth]
users = [
"admin:$apr1$Z7ctdqAW$CGfYufnzmsDad7c7IjV/"
]
[http.routers.api]
rule = "Host(monit.test.com
)"
entrypoints = ["websecure"]
middlewares = ["simpleAuth"]
service = "api@internal"
[http.routers.api.tls]
certResolver="lets-encrypt"
[accessLog]
filePath = "/var/log/traefik/access.log"
[tls.options]
[tls.options.default]
minVersion="VersionTLS12"
[tls.options.mintls13]
minVersion = "VersionTLS13"