Skip to content

abdirahmn1/traefik-error-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Traefik error server

Make your traefik error pages look good 💅

Prerequisites

Installation

git clone https://github.com/abdirahmn1/traefik-error-server.git
cd traefik-errorserver
docker build -t traefik-errorserver .
docker compose up -d

Deployment

Add the error middleware to your services behind traefik.

An example of a service that may use the error middleware is shown below.

services:
  nginx:
    container_name: nginx
    image: nginx
    networks:
      - proxy
    labels:
      - "traefik.enable= true"
      - "traefik.http.routers.nginx-router.rule= Host(`nginx.mydomain`)"
      # Replace `web` with whatever you :80 entrypoint name is.
      - "traefik.http.routers.nginx-router.entrypoints=web"
      - "traefik.http.routers.nginx-router.middlewares=error-pages-middleware@docker"
      - "traefik.http.routers.nginx-router.service=nginx"
      - "traefik.http.services.nginx.loadbalancer.server.port=80"

networks:
  proxy:
    external: true

Releases

No releases published

Packages

No packages published