First of all I\'m sorry if I\'m not using the right terms to ask this question, but I\'m not up to the terminology in place.
I have traefik running in a docker container
I've fiddled around and found the answer.
In traefik.toml
add:
################################################################
# File configuration backend
################################################################
# Enable file configuration backend
# Optional
[file]
filename = "servers.toml"
# Enable watch file changes
watch = true
In docker-compose.yml
change the volumes:
to:
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${SERVER_DIR}/AppData/traefik:/etc/traefik/
- ${PWD}/acme.json:/acme.json
- ${PWD}/traefik.toml:/etc/traefik/traefik.toml
- ${PWD}/servers.toml:/servers.toml
Add file servers.toml
:
loglevel = "ERROR"
[backends]
[backends.nasweb]
[backends.nasweb.servers.nasweb]
url = "http://192.168.1.11:8080"
[frontends]
[frontends.domain]
backend = "nasweb"
[frontends.domain.routes.domain]
rule = "Host:www.myserver.com"