Traefik plugin to start/stop containers as needed
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Adyanth H b23bf2183e 🐛 Fix label names and default service URL to add /api 4 months ago
traefik-container-manager-service@7327f608a7 Fix Paths 4 months ago
.gitignore Initial commit 4 months ago
.gitmodules Changing URLs 4 months ago
.traefik.yml Change config to correct URL 4 months ago
README.md Only using labels. 📝 Add README 4 months ago
config_dev.yml Only using labels. 📝 Add README 4 months ago
docker-compose-dev.yml 🐛 Fix label names and default service URL to add /api 4 months ago
docker-compose.yml Remove unused network 4 months ago
go.mod Fix module name 4 months ago
go.sum Traefik middleware plugin 4 months ago
manager.go 🐛 Fix label names and default service URL to add /api 4 months ago
traefik.yml Only using labels. 📝 Add README 4 months ago
traefik_dev.yml Only using labels. 📝 Add README 4 months ago

README.md

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:

whoami:
    image: containous/whoami
    labels: 
      - traefik.enable=true
      - traefik.http.routers.whoami.entrypoints=entryhttp
      - traefik.http.routers.whoami.rule=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     # Optiona
      - traefik-manager.name=whoami
      - traefik-manager.path=/whoami