Sign inSign up

ttrafelet/traefik_error_pages

By ttrafelet

•Updated 4 days ago

Custom error pages for traefik.

Image
0

10K+

ttrafelet/traefik_error_pages repository overview

⁠Traefik Error Pages

This is a simple Flask container hosting custom error pages. It is based on the latest alpine image to be as small as possible.

The image is intended to be used with Traefik to server the same error page for all services.

The error page design has been written by Saleh Riaz⁠ and may be found in its original on their website⁠.

Note: This image has been designed with my personal needs in mind!

⁠How to

When running this image, it is important to configure Traefik accordingly. The compose.sample.yml in the Git repository shows a working configuration that:

  • Configures the container as new service error-pages
  • Registers a new catch all HTTPS router in Traefik that matches any URL, and connects to the new service
  • Configures a new middleware serve-pretty-errors that uses the error-pages service to supply pretty errors for all HTTP error codes, except 401

This configuration assumes an independent redirection of any HTTP call to HTTPS. If this is not the case in your setup, you will have to register another catch-all rule.

⁠Security

This container will by default run as non-root user flask. As a consequence, you may not use ports below 1024 for $APP_PORT (default is 5000)

⁠Caveats

  • Services that rely on specific output for errors (e.g. JSON or XML) will break when using these error pages. You will have to exclude the specific endpoints of these services from the errors middleware in these cases.

Tag summary

Content type

Image

Digest

sha256:b875b8d10…

Size

28.1 MB

Last updated

4 days ago

docker pull ttrafelet/traefik_error_pages