• Stars
    star
    823
  • Rank 55,417 (Top 2 %)
  • Language
    Go
  • License
    MIT License
  • Created over 4 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐Ÿšง Pretty server's error pages in the docker image & git repository (for traefik, k8s, nginx and so on)

banner

22 feb. 2022 - โšก Our Docker image was downloaded one MILLION times from the docker hub! โšก
10 apr. 2023 - โšก Two million times from the docker hub and one million from the ghcr! โšก

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 in 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 in Go, with the extremely fast FastHTTP under the hood
    • Respects the Content-Type HTTP header (and X-Format) value and responds with the corresponding format (supported formats are json and xml)
    • Writes logs in json format
    • Contains healthcheck endpoint (/healthz)
    • Contains metrics endpoint (/metrics) in Prometheus format
  • Lightweight docker image (~4.6Mb 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
  • Error pages can be embedded into your own nginx docker image
  • Fully configurable (take a look at the configuration file and project Wiki)
  • Distributed using docker image and compiled binary files
  • Localized (๐Ÿ‡บ๐Ÿ‡ธ, ๐Ÿ‡ซ๐Ÿ‡ท, ๐Ÿ‡บ๐Ÿ‡ฆ, ๐Ÿ‡ท๐Ÿ‡บ, ๐Ÿ‡ต๐Ÿ‡น, ๐Ÿ‡ณ๐Ÿ‡ฑ, ๐Ÿ‡ฉ๐Ÿ‡ช, ๐Ÿ‡ช๐Ÿ‡ธ, ๐Ÿ‡จ๐Ÿ‡ณ) HTML error pages (translation process described here - other translations are welcome!)

๐Ÿงฉ 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 in X.Y.Z format

๐Ÿ’ฃ Or you can download already rendered error pages pack as a zip or tar.gz archive.

๐Ÿ›  Usage

Please, take a look at our Wiki for the common usage stories:

๐Ÿฆพ Performance

Used hardware:

  • Intelยฎ Coreโ„ข i7-10510U CPU @ 1.80GHz ร— 8
  • 16 GiB RAM
$ ulimit -aH | grep file
-f: file size (blocks)              unlimited
-c: core file size (blocks)         unlimited
-n: file descriptors                1048576
-x: file locks                      unlimited

$ docker run --rm -p "8080:8080/tcp" -e "SHOW_DETAILS=true" error-pages:local # in separate terminal

$ wrk --timeout 1s -t12 -c400 -d30s -s ./test/wrk/request.lua http://127.0.0.1:8080/
Running 30s test @ http://127.0.0.1:8080/
  12 threads and 400 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    10.84ms    7.89ms 135.91ms   79.36%
    Req/Sec     3.23k   785.11     6.30k    70.04%
  1160567 requests in 30.10s, 4.12GB read
Requests/sec:  38552.04
Transfer/sec:    140.23MB
FS & memory usage stats during the test

๐Ÿช‚ Templates

Name Preview
ghost ghost
l7-light l7-light
l7-dark l7-dark
shuffle shuffle
noise noise
hacker-terminal hacker-terminal
cats cats
lost-in-space lost-in-space
app-down app-down
connection connection
matrix matrix
orient orient

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:

contributors

๐Ÿ“ฐ Changes log

Release date Commits since latest release

Changes log can be found here.

๐Ÿ‘พ Support

Issues Issues

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.

More Repositories

1

domains

๐ŸŒ DNS configuration for some of my domains
JavaScript
777
star
2

random-user-agent

๐Ÿ˜Ž Browser extension that automatically replaces the User-Agent with a randomized one
TypeScript
567
star
3

mikrotik-hosts-parser

โœ‚ Mikrotik hosts parser
Go
249
star
4

laravel-roadrunner-in-docker

๐Ÿš€ An example of Laravel app that runs in a docker container with RoadRunner
PHP
176
star
5

webhook-tester

๐Ÿ”ญ The powerful tool to test webhooks and not only
Go
171
star
6

3proxy-docker

๐Ÿ“ฒ Docker image with 3proxy - Tiny free proxy server
Dockerfile
120
star
7

nod32-update-mirror

๐Ÿ”ถ [WIP] ESET Nod32 Updates Mirror
Shell
107
star
8

tinifier

๐Ÿผ CLI client for images compressing using tinypng.com API
Go
76
star
9

node-docker

๐Ÿณ Docker image, based on node, with git, bash, and openssh
Dockerfile
51
star
10

indocker-app

๐Ÿ’ฅ Domain names with valid SSL for your local docker containers
Go
33
star
11

curl-docker

๐Ÿฆพ curl (static binary file) in a scratch docker image
Dockerfile
22
star
12

mustpl

๐Ÿงฐ Logic-less CLI templating tool
C
21
star
13

rssbot-docker

๐Ÿค– Docker image with lightweight Telegram RSS notification bot
Dockerfile
5
star
14

colors

๐Ÿฆœ One more Go library for using colors in the terminal console
Go
4
star
15

go-filecache

โšก File-based cache with entries expiration, checksum validation and others
Go
3
star
16

tarampampam

โœจ I found a secret โœจ
HTML
2
star
17

http-proxy-daemon

๐Ÿ’Ž Http Proxy Daemon
Go
2
star
18

arduino-deps-installer

๐ŸŽฏ Arduino sketch dependencies installer
Go
1
star
19

urfave-cli-docs

๐Ÿ“š CLI usage docs generator (markdown)
Go
1
star
20

arduino-elscooter-lighting

๐Ÿ”ฉ My electric scooter lighting firmware
C++
1
star