fix: use command flags for Traefik static config to avoid bind mount errors

This commit is contained in:
João Pedro Toledo Goncalves 2026-01-27 11:49:37 -03:00
parent 02d9a30356
commit b1a4cb2ced
1 changed files with 19 additions and 1 deletions

View File

@ -7,9 +7,27 @@ services:
- "80:80" - "80:80"
- "443:443" - "443:443"
- "8080:8080" # Dashboard Traefik (remover em produção se exposto) - "8080:8080" # Dashboard Traefik (remover em produção se exposto)
command:
- "--api.insecure=true"
- "--api.dashboard=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--providers.file.filename=/etc/traefik/dynamic_conf.yml"
- "--providers.file.watch=true"
- "--entrypoints.web.address=:80"
- "--entrypoints.web.http.redirections.entryPoint.to=websecure"
- "--entrypoints.web.http.redirections.entryPoint.scheme=https"
- "--entrypoints.websecure.address=:443"
- "--certificatesresolvers.letsencrypt.acme.httpchallenge=true"
- "--certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web"
- "--certificatesresolvers.letsencrypt.acme.email=suporte@itguys.com.br"
- "--certificatesresolvers.letsencrypt.acme.storage=acme.json"
- "--log.format=json"
- "--log.level=INFO"
- "--accesslog=true"
- "--accesslog.format=json"
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro - /var/run/docker.sock:/var/run/docker.sock:ro
- ./traefik.yml:/etc/traefik/traefik.yml:ro
- ./dynamic_conf.yml:/etc/traefik/dynamic_conf.yml:ro - ./dynamic_conf.yml:/etc/traefik/dynamic_conf.yml:ro
- ./acme.json:/acme.json - ./acme.json:/acme.json
networks: networks: