This Traefik middleware plugin allows you to configure maintenance responses for your routers.
You have to declare the experimental block in your traefik static configuration file or add the
required flags.
Maintenance mode will be triggered if enabled is set to true and if the file configured for
triggerFilename exists.
It's also possible to provide a JSON (or any other) maintenance response by changing the
filename to point to a JSON file and by changing httpContentType to application/json; charset=utf-8.
experimental:plugins:traefik-maintenance:moduleName: github.com/TRIMM/traefik-maintenanceversion: v1.0.1
--experimental.plugins.traefik-maintenance.modulename=github.com/TRIMM/traefik-maintenance--experimental.plugins.traefik-maintenance.version=v1.0.1
http:services:service1:loadBalancer:servers:- url: "http://service1:8080/"service2:loadBalancer:servers:- url: "http://service2:8081/"routers:service1-router:rule: "Host(`service1`)"service: "service1"middlewares:- maintenanceservice2-router:rule: "Host(`service2`)"service: "service2"middlewares:- maintenancemiddlewares:maintenance:plugin:traefik-maintenance:enabled: truefilename: '/path/to/maintenance.html'triggerFilename: '/path/to/maintenance.trigger'httpResponseCode: 503httpContentType: 'text/html; charset=utf-8'