.github | ||
cmd/error-pages | ||
internal | ||
schemas | ||
templates | ||
test/hurl | ||
.codecov.yml | ||
.dockerignore | ||
.editorconfig | ||
.gitignore | ||
.golangci.yml | ||
.grype.yaml | ||
CHANGELOG.md | ||
docker-compose.yml | ||
Dockerfile | ||
error-pages.yml | ||
go.mod | ||
go.sum | ||
LICENSE | ||
Makefile | ||
README.md |
HTTP's error pages
One day you may want to replace the standard error pages of your HTTP server with something more original and pretty. That's what this repository was created for :) It contains:
- Simple error pages generator, written on Go
- Single-page error page templates with different designs (located in the templates directory)
- Fast and lightweight HTTP server
- Already generated error pages (sources can be found here, the demonstration is always accessible here)
🔥 Features list
- HTTP server written on Go, with the extremely fast FastHTTP under the hood
- Respects the
Content-Type
HTTP header (andX-Format
) value and responds with the corresponding format (supported formats isjson
andxml
) - Writes logs in
json
format - Contains healthcheck endpoint (
/healthz
) - Contains metrics endpoint (
/metrics
) in Prometheus format
- Respects the
- Lightweight docker image (~3.7Mb compressed size), distroless and uses the unleveled user by default
- Go-template tags are allowed in the templates
- Ready for integration with Traefik (error pages customization) and Ingress-nginx
- Fully configurable (take a look at the configuration file and project Wiki)
- Distributed using docker image and compiled binary files
🧩 Install
Download the latest binary file for your os/arch from the releases page or use our docker image:
Registry | Image |
---|---|
Docker Hub | tarampampam/error-pages |
GitHub Container Registry | ghcr.io/tarampampam/error-pages |
Using the
latest
tag for the docker image is highly discouraged because of possible backward-incompatible changes during major upgrades. Please, use tags inX.Y.Z
format
🛠 Usage
Please, take a look at our Wiki for the common usage stories:
- HTTP server (routes, formats, flags and environment variables)
- Pages generator (build your own error page set)
- Static error pages (extract generated static error pages from the docker image)
- Usage with nginx (include our error pages into an image with nginx)
- Usage with Traekik and local Docker Compose (it's a good starting point for the tests)
- Usage with Traefik and Docker Swarm
- Kubernetes & ingress nginx
🪂 Templates
Name | Preview |
---|---|
ghost |
|
l7-light |
|
l7-dark |
|
shuffle |
|
noise |
|
hacker-terminal |
|
cats |
Note:
noise
template highly uses the CPU, be careful
🦾 Contributors
I want to say a big thank you to everyone who contributed to this project:
📰 Changes log
Changes log can be found here.
👾 Support
If you find any bugs in the project, please create an issue in the current repository.
📖 License
This is open-sourced software licensed under the MIT License.