traefik: error-pages added (#514)
Co-authored-by: Michael Grote <michael.grote@posteo.de> Reviewed-on: #514
This commit is contained in:
parent
a213f0b88b
commit
908f220afe
6 changed files with 40 additions and 2 deletions
|
@ -28,9 +28,13 @@ services:
|
|||
traefik.http.routers.miniflux.tls.certresolver: resolver_letsencrypt
|
||||
traefik.http.routers.miniflux.entrypoints: entry_https
|
||||
traefik.http.services.miniflux.loadbalancer.server.port: 8080
|
||||
|
||||
traefik.http.routers.miniflux.middlewares: error-pages-middleware
|
||||
|
||||
com.centurylinklabs.watchtower.enable: true
|
||||
com.centurylinklabs.watchtower.depends-on: mf-db
|
||||
|
||||
|
||||
######## PostGreSQL ########
|
||||
db:
|
||||
container_name: "mf-db"
|
||||
|
|
|
@ -36,6 +36,8 @@ services:
|
|||
traefik.http.routers.navidrome-mg.entrypoints: entry_https
|
||||
traefik.http.services.navidrome-mg.loadbalancer.server.port: 4533
|
||||
|
||||
traefik.http.routers.navidrome-mg.middlewares: error-pages-middleware
|
||||
|
||||
com.centurylinklabs.watchtower.enable: true
|
||||
ports:
|
||||
- "4533:4533"
|
||||
|
|
|
@ -106,7 +106,7 @@ services:
|
|||
traefik.http.middlewares.nextcloud-hsts.headers.stsseconds: 15552001
|
||||
traefik.http.middlewares.nextcloud-hsts.headers.isdevelopment: false
|
||||
|
||||
traefik.http.routers.nextcloud.middlewares: nextcloud-hsts@docker,nextcloud-webdav@docker
|
||||
traefik.http.routers.nextcloud.middlewares: nextcloud-hsts,nextcloud-webdav,error-pages-middleware
|
||||
|
||||
######## Networks ########
|
||||
networks:
|
||||
|
|
|
@ -27,6 +27,8 @@ services:
|
|||
traefik.http.routers.registry.middlewares: registry-ipwhitelist
|
||||
traefik.http.middlewares.registry-ipwhitelist.ipwhitelist.sourcerange: 192.168.0.0/17
|
||||
|
||||
traefik.http.routers.registry.middlewares: error-pages-middleware
|
||||
|
||||
com.centurylinklabs.watchtower.depends-on: oci-registry-redis
|
||||
com.centurylinklabs.watchtower.enable: true
|
||||
|
||||
|
@ -63,7 +65,7 @@ services:
|
|||
- intern
|
||||
labels:
|
||||
traefik.http.routers.registry-ui.rule: Host(`registry.mgrote.net`)&&PathPrefix(`/ui`) # mache unter /ui erreichbar, damit wird demPfad dieser Prefix hinzugefügt, die Anwendung "hört" dort abrer nicht
|
||||
traefik.http.routers.registry-ui.middlewares: registry-ui-strip-prefix,registry-ui-auth # also entferne den Prefix danach wieder
|
||||
traefik.http.routers.registry-ui.middlewares: registry-ui-strip-prefix,registry-ui-auth,error-pages-middleware # also entferne den Prefix danach wieder
|
||||
traefik.http.middlewares.registry-ui-strip-prefix.stripprefix.prefixes: /ui # hier ist die Middleware definiert
|
||||
traefik.enable: true
|
||||
traefik.http.routers.registry-ui.tls: true
|
||||
|
|
|
@ -21,6 +21,34 @@ services:
|
|||
TZ: Europe/Berlin
|
||||
labels:
|
||||
com.centurylinklabs.watchtower.enable: true
|
||||
######## traefik ########
|
||||
# https://github.com/tarampampam/error-pages/wiki/Traefik-(docker-compose)
|
||||
error-pages:
|
||||
container_name: "traefik-error-pages"
|
||||
image: tarampampam/error-pages:2
|
||||
environment:
|
||||
TEMPLATE_NAME: ghost
|
||||
labels:
|
||||
com.centurylinklabs.watchtower.enable: true
|
||||
|
||||
traefik.enable: true
|
||||
# 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.entrypoints: entry_https
|
||||
traefik.http.routers.error-pages-router.middlewares: error-pages-middleware
|
||||
# "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
|
||||
# define service properties
|
||||
traefik.http.services.error-pages-service.loadbalancer.server.port: 8080
|
||||
depends_on:
|
||||
- traefik
|
||||
networks:
|
||||
- traefik
|
||||
|
||||
######## Networks ########
|
||||
networks:
|
||||
traefik:
|
||||
|
|
|
@ -25,6 +25,8 @@ http:
|
|||
- entry_https
|
||||
tls:
|
||||
certresolver: resolver_letsencrypt
|
||||
middlewares:
|
||||
- error-pages-middleware@docker
|
||||
router_gitea:
|
||||
rule: "Host(`git.mgrote.net`)"
|
||||
service: "service_gitea"
|
||||
|
|
Loading…
Reference in a new issue