|
|
|
@ -0,0 +1,31 @@
|
|
|
|
|
version: '3.8'
|
|
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
|
|
|
|
|
app:
|
|
|
|
|
command:
|
|
|
|
|
- --providers.docker
|
|
|
|
|
- --experimental.plugins.staticresponse.modulename=github.com/jdel/staticresponse
|
|
|
|
|
- --experimental.plugins.staticresponse.version=v0.0.1
|
|
|
|
|
deploy:
|
|
|
|
|
labels:
|
|
|
|
|
# custom traefik errors
|
|
|
|
|
- "traefik.http.middlewares.web-secure.errors.status=400-599"
|
|
|
|
|
- "traefik.http.middlewares.web-secure.errors.service=down-rule"
|
|
|
|
|
- "traefik.http.middlewares.web-secure.errors.query=/traefik-http-error/{status}"
|
|
|
|
|
# catchall rule
|
|
|
|
|
- "traefik.http.routers.http-catchall.entrypoints=web-secure"
|
|
|
|
|
- "traefik.http.routers.http-catchall.rule=PathPrefix(`/`)"
|
|
|
|
|
# lowest possible priority, evaluated when no other router is matched
|
|
|
|
|
- "traefik.http.routers.http-catchall.priority=1"
|
|
|
|
|
- "traefik.http.routers.http-catchall.middlewares=503down"
|
|
|
|
|
# static error message
|
|
|
|
|
- "traefik.http.middlewares.503down.plugin.staticresponse"
|
|
|
|
|
- "traefik.http.middlewares.503down.plugin.staticresponse.StatusCode=503"
|
|
|
|
|
- "traefik.http.middlewares.503down.plugin.staticresponse.Body=Sorry, currently under maintenance. Please try again later."
|
|
|
|
|
# error page
|
|
|
|
|
- "traefik.http.routers.down-rule.rule=PathPrefix(`/traefik-http-error`)"
|
|
|
|
|
- "traefik.http.routers.down-rule.service=noop@internal"
|
|
|
|
|
- "traefik.http.routers.down-rule.entrypoints=web-secure"
|
|
|
|
|
- "traefik.http.routers.down-rule.middlewares=503down"
|
|
|
|
|
|