Go to file
2020-07-08 16:12:21 +05:00
.github/workflows Basic repo files added 2020-07-08 16:12:21 +05:00
bin Basic repo files added 2020-07-08 16:12:21 +05:00
docker Basic repo files added 2020-07-08 16:12:21 +05:00
static Basic repo files added 2020-07-08 16:12:21 +05:00
templates Basic repo files added 2020-07-08 16:12:21 +05:00
.dockerignore Basic repo files added 2020-07-08 16:12:21 +05:00
.editorconfig Basic repo files added 2020-07-08 16:12:21 +05:00
.gitignore Basic repo files added 2020-07-08 16:12:21 +05:00
CHANGELOG.md Basic repo files added 2020-07-08 16:12:21 +05:00
configuration.json Basic repo files added 2020-07-08 16:12:21 +05:00
Dockerfile Basic repo files added 2020-07-08 16:12:21 +05:00
LICENSE Basic repo files added 2020-07-08 16:12:21 +05:00
Makefile Basic repo files added 2020-07-08 16:12:21 +05:00
package.json Basic repo files added 2020-07-08 16:12:21 +05:00
README.md Basic repo files added 2020-07-08 16:12:21 +05:00
yarn.lock Basic repo files added 2020-07-08 16:12:21 +05:00

Static error pages in a Docker container

Build Status License

This repository contains a very simple generator for server error pages (like 404: Not found) and ready docker image with web server for error pages serving.

Generator (bin/generator.js) allows you:

  • Use different templates (section templates in configuration file)
  • Generate pages with arbitrary content according to a specific template

Can be used for Traefik error pages customization.

Usage

Just execute (installed nodejs is required):

$ bin/generator.js -c ./configuration.json -o ./out

And watch into ./out directory:

./out
└── ghost
    ├── 400.html
    ├── 401.html
    ├── 403.html
    ├── 404.html
    ├── ...
    └── 505.html

Default configuration can be found in configuration.json file.

Docker

Start image (nginx inside):

$ docker run --rm -p "8080:8080" tarampampam/error-pages:1.0.0

And open in your browser http://127.0.0.1:8080/ghost/400.html. Additionally, you can set "default" pages theme by passing TEMPLATE_NAME environment variable (eg.: -e "TEMPLATE_NAME=ghost") - in this case all error pages will be accessible in root directory (eg.: http://127.0.0.1:8080/400.html).

Also you can use generated error pages in your own docker images:

FROM nginx:1.18-alpine

COPY --from=tarampampam/error-pages:1.0.0 /opt/html/ghost /usr/share/nginx/html/error-pages

error_page for nginx configuration

Changes log

Release date Commits since latest release

Changes log can be found here.

Support

Issues Issues

If you will find any package errors, please, make an issue in current repository.

License

This is open-sourced software licensed under the MIT License.