attempt at adding error pages
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
f1cfb814dd
commit
a805f5de26
|
@ -15,6 +15,9 @@ COMPOSE_FILE="compose.yml"
|
||||||
# General settings #
|
# General settings #
|
||||||
#####################################################################
|
#####################################################################
|
||||||
|
|
||||||
|
## Error pages
|
||||||
|
COMPOSE_FILE="$COMPOSE_FILE:compose.error-pages.yml"
|
||||||
|
|
||||||
## Host-mode networking
|
## Host-mode networking
|
||||||
#COMPOSE_FILE="$COMPOSE_FILE:compose.host.yml"
|
#COMPOSE_FILE="$COMPOSE_FILE:compose.host.yml"
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
services:
|
||||||
|
error-pages:
|
||||||
|
image: tarampampam/error-pages:latest # Using the latest tag is highly discouraged. Please, use tags in X.Y.Z format
|
||||||
|
environment:
|
||||||
|
TEMPLATE_NAME: app-down
|
||||||
|
networks:
|
||||||
|
- proxy
|
||||||
|
deploy:
|
||||||
|
placement:
|
||||||
|
constraints:
|
||||||
|
- node.role == worker
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.docker.network=proxy"
|
||||||
|
- # use as "fallback" for any non-registered services (with priority below normal)
|
||||||
|
- "traefik.http.routers.error-pages-router.rule=HostRegexp(`{host:.+}`)"
|
||||||
|
- "traefik.http.routers.error-pages-router.priority=10"
|
||||||
|
- # should say that all of your services work on https
|
||||||
|
- "traefik.http.routers.error-pages-router.tls=true"
|
||||||
|
- "traefik.http.routers.error-pages-router.entrypoints=https"
|
||||||
|
- "traefik.http.routers.error-pages-router.middlewares=error-pages-middleware"
|
||||||
|
- "traefik.http.services.error-pages-service.loadbalancer.server.port=8080"
|
||||||
|
- # "errors" middleware settings
|
||||||
|
- "traefik.http.middlewares.error-pages-middleware.errors.status=400-599"
|
||||||
|
- "traefik.http.middlewares.error-pages-middleware.errors.service=error-pages-service"
|
||||||
|
- "traefik.http.middlewares.error-pages-middleware.errors.query=/{status}.html"
|
||||||
|
|
||||||
|
app:
|
||||||
|
deploy:
|
||||||
|
labels:
|
||||||
|
# next line is important
|
||||||
|
- "traefik.http.routers.${STACK_NAME}.middlewares=error-pages-middleware"
|
||||||
|
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=80"
|
||||||
|
|
Loading…
Reference in New Issue