https://github.com/adyanth/traefik-container-manager
Start docker containers on requests and stop them after a timeout
https://github.com/adyanth/traefik-container-manager
traefik traefik-plugin
Last synced: about 1 year ago
JSON representation
Start docker containers on requests and stop them after a timeout
- Host: GitHub
- URL: https://github.com/adyanth/traefik-container-manager
- Owner: adyanth
- Created: 2021-06-13T17:19:39.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-08-22T11:22:26.000Z (almost 5 years ago)
- Last Synced: 2025-05-13T01:53:59.276Z (about 1 year ago)
- Topics: traefik, traefik-plugin
- Language: Go
- Homepage:
- Size: 19.5 KB
- Stars: 23
- Watchers: 2
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# traefik-container-manager
Traefik plugin to start/stop containers as needed.
Needs `traefik-container-manager-service` and should be accessible by traefik container to work. Defaults to `http://manager:10000/api`, so if you have a compose file with the service named manager accessible by traefik over the default network, you are good to go.
Just add this middleware to any router, configuring name which should match `traefik-container-manager.name`. and timeout. with the needed labels for `traefik-container-manager-service`.
A sample shown below can be used for reference:
```yaml
whoami:
image: containous/whoami
labels:
- traefik.enable=true
- traefik.http.routers.whoami.entrypoints=entryhttp
- traefik.http.routers.whoami.rule=Host(`whoami.adyanth.lan`) || PathPrefix(`/whoami`)
- traefik.http.routers.whoami.middlewares=whoami-timeout
- traefik.http.services.whoami.loadbalancer.server.port=80
- traefik.http.middlewares.whoami-timeout.plugin.traefik-container-manager.timeout=5
- traefik.http.middlewares.whoami-timeout.plugin.traefik-container-manager.name=whoami
- traefik.http.middlewares.whoami-timeout.plugin.traefik-container-manager.serviceUrl=http://manager:10000/api # Optional
- traefik-container-manager.name=whoami
- traefik-container-manager.path=/whoami # Prefix matched to the incoming path. To be used if using PathPrefix routing
- traefik-container-manager.host=whoami # Prefix matched to the incoming hostname. Can provide the subdomain or the complete fqdn. To be used if using Host routing
```