{"id":13581894,"url":"https://github.com/tarampampam/error-pages","last_synced_at":"2025-05-14T19:09:38.030Z","repository":{"id":38012516,"uuid":"278033167","full_name":"tarampampam/error-pages","owner":"tarampampam","description":"🚧 Pretty server's error pages in the docker image \u0026 git repository (for traefik, k8s, nginx and so on)","archived":false,"fork":false,"pushed_at":"2025-05-07T09:49:25.000Z","size":2174,"stargazers_count":1052,"open_issues_count":8,"forks_count":96,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-13T04:40:25.229Z","etag":null,"topics":["docker","docker-image","error-pages","errors","http","nginx","traefik"],"latest_commit_sha":null,"homepage":"https://tarampampam.github.io/error-pages/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tarampampam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-07-08T08:26:11.000Z","updated_at":"2025-05-12T09:10:31.000Z","dependencies_parsed_at":"2023-10-02T08:02:15.766Z","dependency_job_id":"ff35e46f-ba59-47b7-9b01-63bd5106ab70","html_url":"https://github.com/tarampampam/error-pages","commit_stats":{"total_commits":359,"total_committers":27,"mean_commits":"13.296296296296296","dds":0.5988857938718664,"last_synced_commit":"85b4cdca0a4a086f532b8cf8946411c543654be1"},"previous_names":[],"tags_count":58,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarampampam%2Ferror-pages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarampampam%2Ferror-pages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarampampam%2Ferror-pages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarampampam%2Ferror-pages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tarampampam","download_url":"https://codeload.github.com/tarampampam/error-pages/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254209859,"owners_count":22032897,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-image","error-pages","errors","http","nginx","traefik"],"created_at":"2024-08-01T15:02:18.294Z","updated_at":"2025-05-14T19:09:35.694Z","avatar_url":"https://github.com/tarampampam.png","language":"Go","funding_links":[],"categories":["Go","http","docker"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/tarampampam/error-pages#readme\"\u003e\n    \u003cpicture\u003e\n      \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://socialify.git.ci/tarampampam/error-pages/image?description=1\u0026font=Raleway\u0026forks=1\u0026issues=1\u0026logo=https%3A%2F%2Fhsto.org%2Fwebt%2Frm%2F9y%2Fww%2Frm9ywwx3gjv9agwkcmllhsuyo7k.png\u0026owner=1\u0026pulls=1\u0026pattern=Solid\u0026stargazers=1\u0026theme=Dark\"\u003e\n      \u003cimg align=\"center\" src=\"https://socialify.git.ci/tarampampam/error-pages/image?description=1\u0026font=Raleway\u0026forks=1\u0026issues=1\u0026logo=https%3A%2F%2Fhsto.org%2Fwebt%2Frm%2F9y%2Fww%2Frm9ywwx3gjv9agwkcmllhsuyo7k.png\u0026owner=1\u0026pulls=1\u0026pattern=Solid\u0026stargazers=1\u0026theme=Light\"\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#\"\u003e\u003cimg src=\"https://img.shields.io/github/go-mod/go-version/tarampampam/error-pages?longCache=true\u0026label=\u0026logo=go\u0026logoColor=white\u0026style=flat-square\" alt=\"\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/tarampampam/error-pages/actions\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/tarampampam/error-pages/tests.yml?branch=master\u0026maxAge=30\u0026label=tests\u0026logo=github\u0026style=flat-square\" alt=\"\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/tarampampam/error-pages/actions\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/tarampampam/error-pages/release.yml?maxAge=30\u0026label=release\u0026logo=github\u0026style=flat-square\" alt=\"\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://hub.docker.com/r/tarampampam/error-pages\"\u003e\u003cimg src=\"https://img.shields.io/docker/pulls/tarampampam/error-pages.svg?maxAge=30\u0026label=pulls\u0026logo=docker\u0026logoColor=white\u0026style=flat-square\" alt=\"\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://hub.docker.com/r/tarampampam/error-pages\"\u003e\u003cimg src=\"https://img.shields.io/docker/image-size/tarampampam/error-pages/latest?maxAge=30\u0026label=size\u0026logo=docker\u0026logoColor=white\u0026style=flat-square\" alt=\"\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/tarampampam/error-pages/blob/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/tarampampam/error-pages.svg?maxAge=30\u0026style=flat-square\" alt=\"\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nOne day, you might want to replace the standard error pages of your HTTP server or K8S cluster with something more\noriginal and attractive. That's why this repository was created :) It contains:\n\n- A simple error page generator written in Go\n- Single-page error templates (themes) with various designs (located in the [templates][templates-dir] directory) that\n  you can customize as you wish\n- A fast and lightweight HTTP server is available as a single binary file and Docker image. It includes built-in error\n  page templates from this repository. You don't need anything except the compiled binary file or Docker image\n- Pre-generated error pages (sources can be [found here][preview-sources], and the [**demo** is always\n  accessible here][preview-demo])\n\n[preview-sources]:https://github.com/tarampampam/error-pages/tree/gh-pages\n[preview-demo]:https://tarampampam.github.io/error-pages/\n[templates-dir]:https://github.com/tarampampam/error-pages/tree/master/templates\n\n## 🔥 Features List\n\n- HTTP server written in Go, utilizing the extremely fast [FastHTTP][fasthttp] and in-memory caching\n  - Respects the `Content-Type` HTTP header (and `X-Format`) value, responding with the corresponding format\n    (supported formats: `json`, `xml`, and `plaintext`)\n  - Error pages are configured to be excluded from search engine indexing (using meta tags and HTTP headers) to\n    prevent SEO issues on your website\n  - HTML content (including CSS, SVG, and JS) is minified on the fly\n  - Logs written in `json` format\n  - Contains a health check endpoint (`/healthz`)\n  - Consumes very few resources and is suitable for use in resource-constrained environments\n- Lightweight Docker image, distroless, and uses an unprivileged user by default\n- [Go-template](https://pkg.go.dev/text/template) tags are allowed in the templates\n- Ready for integration with [Traefik][traefik], [Ingress-nginx][ingress-nginx], and more\n- Error pages can be embedded into your own Docker image with `nginx` in a few simple steps\n- Fully configurable\n- Distributed as a Docker image and compiled binary files\n- Localized HTML error pages (🇺🇸, 🇫🇷, 🇺🇦, 🇷🇺, 🇵🇹, 🇳🇱, 🇩🇪, 🇪🇸, 🇨🇳, 🇮🇩, 🇵🇱, 🇰🇷) - translation process\n  [described here][l10n-dir] - other translations are welcome!\n\n[fasthttp]:https://github.com/valyala/fasthttp\n[traefik]:https://github.com/traefik/traefik\n[l10n-dir]:https://github.com/tarampampam/error-pages/tree/master/l10n\n\n## 🧩 Install\n\nDownload the latest binary file for your OS/architecture from the [releases page][latest-release] or use our Docker image:\n\n| Registry                          | Image                             |\n|-----------------------------------|-----------------------------------|\n| [GitHub Container Registry][ghcr] | `ghcr.io/tarampampam/error-pages` |\n| [Docker Hub][docker-hub] (mirror) | `tarampampam/error-pages`         |\n\n\u003e [!IMPORTANT]\n\u003e Using the `latest` tag for the Docker image is highly discouraged due to potential backward-incompatible changes\n\u003e during **major** upgrades. Please use tags in the `X.Y.Z` format.\n\n💣 **Or** you can also download the **already rendered** error pages pack as a [zip][pages-pack-zip] or\n[tar.gz][pages-pack-tar-gz] archive.\n\n[latest-release]:https://github.com/tarampampam/error-pages/releases/latest\n[docker-hub]:https://hub.docker.com/r/tarampampam/error-pages\n[ghcr]:https://github.com/tarampampam/error-pages/pkgs/container/error-pages\n[pages-pack-zip]:https://github.com/tarampampam/error-pages/zipball/gh-pages/\n[pages-pack-tar-gz]:https://github.com/tarampampam/error-pages/tarball/gh-pages/\n\n## 🪂 Templates (themes)\n\nThe following templates are built-in and available for use without any additional setup:\n\n\u003e [!NOTE]\n\u003e The `cats` template is the only one of those that fetches resources (the actual cat pictures) from external\n\u003e servers - all other templates are self-contained.\n\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth\u003eTemplate\u003c/th\u003e\n      \u003cth\u003ePreview\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\"\u003e\n        \u003ccode\u003eapp-down\u003c/code\u003e\u003cbr/\u003e\u003cbr/\u003e\n        \u003cpicture\u003e\n          \u003cimg src=\"https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Ferror-pages.goatcounter.com%2Fcounter%2F%2Fuse-template%2Fapp-down.json\u0026query=%24.count\u0026label=used%20times\" alt=\"used times\"\u003e\n        \u003c/picture\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n        \u003ca href=\"https://tarampampam.github.io/error-pages/app-down/404.html\"\u003e\n          \u003cpicture\u003e\n            \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/tarampampam/error-pages/assets/7326800/4e668a56-a4c4-47cd-ac4d-b6b45db54ab8\"\u003e\n            \u003cimg align=\"center\" src=\"https://github.com/tarampampam/error-pages/assets/7326800/ad4b4fd7-7c7b-4bdc-a6b6-44f9ba7f77ca\"\u003e\n          \u003c/picture\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\"\u003e\n        \u003ccode\u003ecats\u003c/code\u003e\u003cbr/\u003e\u003cbr/\u003e\n        \u003cpicture\u003e\n          \u003cimg src=\"https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Ferror-pages.goatcounter.com%2Fcounter%2F%2Fuse-template%2Fcats.json\u0026query=%24.count\u0026label=used%20times\" alt=\"used times\"\u003e\n        \u003c/picture\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n        \u003ca href=\"https://tarampampam.github.io/error-pages/cats/404.html\"\u003e\n          \u003cpicture\u003e\n            \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/tarampampam/error-pages/assets/7326800/5689880b-f770-406c-81dd-2d28629e6f2e\"\u003e\n            \u003cimg align=\"center\" src=\"https://github.com/tarampampam/error-pages/assets/7326800/056cd00e-bc9a-4120-8325-310d7b0ebd1b\"\u003e\n          \u003c/picture\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\"\u003e\n        \u003ccode\u003econnection\u003c/code\u003e\u003cbr/\u003e\u003cbr/\u003e\n        \u003cpicture\u003e\n          \u003cimg src=\"https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Ferror-pages.goatcounter.com%2Fcounter%2F%2Fuse-template%2Fconnection.json\u0026query=%24.count\u0026label=used%20times\" alt=\"used times\"\u003e\n        \u003c/picture\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n        \u003ca href=\"https://tarampampam.github.io/error-pages/connection/404.html\"\u003e\n          \u003cpicture\u003e\n            \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/tarampampam/error-pages/assets/7326800/3f03dc1b-c1ee-4a91-b3d7-e3b93c79020e\"\u003e\n            \u003cimg align=\"center\" src=\"https://github.com/tarampampam/error-pages/assets/7326800/099ecc2d-e724-4d9c-b5ed-66ddabd71139\"\u003e\n          \u003c/picture\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\"\u003e\n        \u003ccode\u003eghost\u003c/code\u003e\u003cbr/\u003e\u003cbr/\u003e\n        \u003cpicture\u003e\n          \u003cimg src=\"https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Ferror-pages.goatcounter.com%2Fcounter%2F%2Fuse-template%2Fghost.json\u0026query=%24.count\u0026label=used%20times\" alt=\"used times\"\u003e\n        \u003c/picture\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n        \u003ca href=\"https://tarampampam.github.io/error-pages/ghost/404.html\"\u003e\n          \u003cpicture\u003e\n            \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/tarampampam/error-pages/assets/7326800/714482ab-f8c1-4455-8ae8-b2ae78f7a2c6\"\u003e\n            \u003cimg align=\"center\" src=\"https://github.com/tarampampam/error-pages/assets/7326800/f253dfe7-96a0-4e96-915b-d4c544d4a237\"\u003e\n          \u003c/picture\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\"\u003e\n        \u003ccode\u003ehacker-terminal\u003c/code\u003e\u003cbr/\u003e\u003cbr/\u003e\n        \u003cpicture\u003e\n          \u003cimg src=\"https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Ferror-pages.goatcounter.com%2Fcounter%2F%2Fuse-template%2Fhacker-terminal.json\u0026query=%24.count\u0026label=used%20times\" alt=\"used times\"\u003e\n        \u003c/picture\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n        \u003ca href=\"https://tarampampam.github.io/error-pages/hacker-terminal/404.html\"\u003e\n          \u003cpicture\u003e\n            \u003cimg align=\"center\" src=\"https://github.com/tarampampam/error-pages/assets/7326800/c197fc35-0844-43d0-9830-82440cee4559\"\u003e\n          \u003c/picture\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\"\u003e\n        \u003ccode\u003el7\u003c/code\u003e\u003cbr/\u003e\u003cbr/\u003e\n        \u003cpicture\u003e\n          \u003cimg src=\"https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Ferror-pages.goatcounter.com%2Fcounter%2F%2Fuse-template%2Fl7.json\u0026query=%24.count\u0026label=used%20times\" alt=\"used times\"\u003e\n        \u003c/picture\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n        \u003ca href=\"https://tarampampam.github.io/error-pages/l7/404.html\"\u003e\n          \u003cpicture\u003e\n            \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/tarampampam/error-pages/assets/7326800/18e43ea3-6389-4459-be41-0fc6566a073f\"\u003e\n            \u003cimg align=\"center\" src=\"https://github.com/tarampampam/error-pages/assets/7326800/05f26669-94ec-40ce-8d67-a199cde54202\"\u003e\n          \u003c/picture\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\"\u003e\n        \u003ccode\u003elost-in-space\u003c/code\u003e\u003cbr/\u003e\u003cbr/\u003e\n        \u003cpicture\u003e\n          \u003cimg src=\"https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Ferror-pages.goatcounter.com%2Fcounter%2F%2Fuse-template%2Flost-in-space.json\u0026query=%24.count\u0026label=used%20times\" alt=\"used times\"\u003e\n        \u003c/picture\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n        \u003ca href=\"https://tarampampam.github.io/error-pages/lost-in-space/404.html\"\u003e\n          \u003cpicture\u003e\n            \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/tarampampam/error-pages/assets/7326800/debf87c0-6f27-41a8-b141-ee3464cbd6cc\"\u003e\n            \u003cimg align=\"center\" src=\"https://github.com/tarampampam/error-pages/assets/7326800/c347e63d-13a7-46d4-81b9-b25266819a1d\"\u003e\n          \u003c/picture\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\"\u003e\n        \u003ccode\u003enoise\u003c/code\u003e\u003cbr/\u003e\u003cbr/\u003e\n        \u003cpicture\u003e\n          \u003cimg src=\"https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Ferror-pages.goatcounter.com%2Fcounter%2F%2Fuse-template%2Fnoise.json\u0026query=%24.count\u0026label=used%20times\" alt=\"used times\"\u003e\n        \u003c/picture\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n        \u003ca href=\"https://tarampampam.github.io/error-pages/noise/404.html\"\u003e\n          \u003cpicture\u003e\n            \u003cimg align=\"center\" src=\"https://github.com/tarampampam/error-pages/assets/7326800/4cc5c3bd-6ebb-4e96-bee8-02d4ad4e7266\"\u003e\n          \u003c/picture\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\"\u003e\n        \u003ccode\u003eorient\u003c/code\u003e\u003cbr/\u003e\u003cbr/\u003e\n        \u003cpicture\u003e\n          \u003cimg src=\"https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Ferror-pages.goatcounter.com%2Fcounter%2F%2Fuse-template%2Forient.json\u0026query=%24.count\u0026label=used%20times\" alt=\"used times\"\u003e\n        \u003c/picture\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n        \u003ca href=\"https://tarampampam.github.io/error-pages/orient/404.html\"\u003e\n          \u003cpicture\u003e\n            \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/tarampampam/error-pages/assets/7326800/bc2b0dad-c32c-4628-98f6-e3eab61dd1f2\"\u003e\n            \u003cimg align=\"center\" src=\"https://github.com/tarampampam/error-pages/assets/7326800/8fc0a7ea-694d-49ce-bb50-3ea032d52d1e\"\u003e\n          \u003c/picture\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\"\u003e\n        \u003ccode\u003eshuffle\u003c/code\u003e\u003cbr/\u003e\u003cbr/\u003e\n        \u003cpicture\u003e\n          \u003cimg src=\"https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Ferror-pages.goatcounter.com%2Fcounter%2F%2Fuse-template%2Fshuffle.json\u0026query=%24.count\u0026label=used%20times\" alt=\"used times\"\u003e\n        \u003c/picture\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n        \u003ca href=\"https://tarampampam.github.io/error-pages/shuffle/404.html\"\u003e\n          \u003cpicture\u003e\n            \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/tarampampam/error-pages/assets/7326800/7504b7c3-b0cb-4991-9ac2-759cd6c50fc0\"\u003e\n            \u003cimg align=\"center\" src=\"https://github.com/tarampampam/error-pages/assets/7326800/d2a73fc8-cf5f-4f42-bff8-cce33d8ae47e\"\u003e\n          \u003c/picture\u003e\n        \u003c/a\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003e [!NOTE]\n\u003e The \"used times\" counter increments when someone start the server with the specified template. Stats service does\n\u003e not collect any information about location, IP addresses, and so on. Moreover, the stats are open and available for\n\u003e everyone at [error-pages.goatcounter.com](https://error-pages.goatcounter.com/). This is simply a counter to display\n\u003e how often a particular template is used, nothing more.\n\n## 🛠 Usage scenarios\n\n### HTTP server starting, utilizing either a binary file or Docker image\n\nFirst, ensure you have a precompiled binary file on your machine or have Docker/Podman installed. Next, start the\nserver with the following command:\n\n```bash\n$ ./error-pages serve\n# --- or ---\n$ docker run --rm -p '8080:8080/tcp' tarampampam/error-pages serve\n```\n\nThat's it! The server will begin running and listen on address `0.0.0.0` and port `8080`. Access error pages using\nURLs like `http://127.0.0.1:8080/{page_code}.html`.\n\nTo retrieve different error page codes using a static URL, use the `X-Code` HTTP header:\n\n```bash\n$ curl -H 'X-Code: 500' http://127.0.0.1:8080/\n```\n\nThe server respects the `Content-Type` HTTP header (and `X-Format`), delivering responses in requested formats\nsuch as HTML, XML, JSON, and PlainText. Customization of these formats is possible via CLI flags or environment\nvariables.\n\nFor integration with [ingress-nginx][ingress-nginx] or debugging purposes, start the server with `--show-details`\n(or set the environment variable `SHOW_DETAILS=true`) to enrich error pages (including JSON and XML responses)\nwith upstream proxy information.\n\nSwitch themes using the `TEMPLATE_NAME` environment variable or the `--template-name` flag; available templates\nare detailed in the readme file below.\n\n\u003e [!TIP]\n\u003e Use the `--rotation-mode` flag or the `TEMPLATES_ROTATION_MODE` environment variable to automate theme\n\u003e rotation. Available modes include `random-on-startup`, `random-on-each-request`, `random-hourly`,\n\u003e and `random-daily`.\n\nTo proxy HTTP headers from requests to responses, utilize the `--proxy-headers` flag or environment variable\n(comma-separated list of headers).\n\n### 🔌 Integrations with Traefik, Nginx, Kubernetes (and more)\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cstrong\u003e🚀 Start the HTTP server with my custom template (theme)\u003c/strong\u003e\u003c/summary\u003e\n\nFirst, create your own template file, for example `my-super-theme.html`:\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n\u003chead\u003e\n  \u003ctitle\u003e{{ code }}\u003c/title\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n  \u003ch1\u003eYEAH! {{ message }}: {{ description }}\u003c/h1\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\nAnd simply start the server with the following command:\n\n```bash\n$ docker run --rm \\\n  -v \"$(pwd)/my-super-theme.html:/opt/my-template.html:ro\" \\\n  -p '8080:8080/tcp' ghcr.io/tarampampam/error-pages:3 serve \\\n    --add-template /opt/my-template.html \\\n    --template-name my-template\n# --- or ---\n$ ./error-pages serve \\\n  --add-template /opt/my-template.html \\\n  --template-name my-template\n```\n\nAnd test it:\n\n```bash\n$ curl -H \"Accept: text/html\" http://127.0.0.1:8080/503\n\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n\u003chead\u003e\n  \u003ctitle\u003e503\u003c/title\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n  \u003ch1\u003eYEAH! Service Unavailable: The server is temporarily overloading or down\u003c/h1\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cstrong\u003e🚀 Generate a set of error pages using built-in or my own template\u003c/strong\u003e\u003c/summary\u003e\n\nGenerating a set of error pages is straightforward. If you prefer to use your own template, start by crafting it.\nCreate a file like this:\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n\u003chead\u003e\n  \u003ctitle\u003e{{ code }}\u003c/title\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n  \u003ch1\u003e{{ message }}: {{ description }}\u003c/h1\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\nSave it as `my-template.html` and use it as your custom template. Then, generate your error pages using the command:\n\n```bash\n$ mkdir -p /path/to/output\n$ ./error-pages build --add-template /path/to/your/my-template.html --target-dir /path/to/output\n```\n\nThis will create error pages based on your template in the specified output directory:\n\n```bash\n$ cd /path/to/output \u0026\u0026 tree .\n├── my-template\n│   ├── 400.html\n│   ├── 401.html\n│   ├── 403.html\n│   ├── 404.html\n│   ├── 405.html\n│   ├── 407.html\n│   ├── 408.html\n│   ├── 409.html\n│   ├── 410.html\n│   ├── 411.html\n│   ├── 412.html\n│   ├── 413.html\n│   ├── 416.html\n│   ├── 418.html\n│   ├── 429.html\n│   ├── 500.html\n│   ├── 502.html\n│   ├── 503.html\n│   ├── 504.html\n│   └── 505.html\n…\n\n$ cat my-template/403.html\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n\u003chead\u003e\n  \u003ctitle\u003e403\u003c/title\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n  \u003ch1\u003eForbidden: Access is forbidden to the requested page\u003c/h1\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cstrong\u003e🚀 Customize error pages within your own Nginx Docker image\u003c/strong\u003e\u003c/summary\u003e\n\nTo create this cocktail, we need two components:\n\n- Nginx configuration file\n- A Dockerfile to build the image\n\nLet's start with the Nginx configuration file:\n\n```nginx\n# File: nginx.conf\n\nserver {\n  listen      80;\n  server_name localhost;\n\n  error_page 401 /_error-pages/401.html;\n  error_page 403 /_error-pages/403.html;\n  error_page 404 /_error-pages/404.html;\n  error_page 500 /_error-pages/500.html;\n  error_page 502 /_error-pages/502.html;\n  error_page 503 /_error-pages/503.html;\n\n  location ^~ /_error-pages/ {\n    internal;\n    root /usr/share/nginx/errorpages;\n  }\n\n  location / {\n    root  /usr/share/nginx/html;\n    index index.html index.htm;\n  }\n}\n```\n\nAnd the Dockerfile:\n\n```dockerfile\nFROM docker.io/library/nginx:1.27-alpine\n\n# override default Nginx configuration\nCOPY --chown=nginx ./nginx.conf /etc/nginx/conf.d/default.conf\n\n# copy statically built error pages from the error-pages image\n# (instead of `ghost` you may use any other template)\nCOPY --chown=nginx \\\n     --from=ghcr.io/tarampampam/error-pages:3 \\\n     /opt/html/ghost /usr/share/nginx/errorpages/_error-pages\n```\n\nNow, we can build the image:\n\n```bash\n$ docker build --tag your-nginx:local -f ./Dockerfile .\n```\n\nAnd voilà! Let's start the image and test if everything is working as expected:\n\n```bash\n$ docker run --rm -p '8081:80/tcp' your-nginx:local\n\n$ curl http://127.0.0.1:8081/foobar | head -n 15 # in another terminal\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cstrong\u003e🚀 Usage with Traefik and local Docker Compose\u003c/strong\u003e\u003c/summary\u003e\n\nInstead of thousands of words, let's take a look at one compose file:\n\n```yaml\n# file: compose.yml (or docker-compose.yml)\n\nservices:\n  traefik:\n    image: docker.io/library/traefik:v3.1\n    command:\n      #- --log.level=DEBUG\n      - --api.dashboard=true # activate dashboard\n      - --api.insecure=true # enable the API in insecure mode\n      - --providers.docker=true # enable Docker backend with default settings\n      - --providers.docker.exposedbydefault=false # do not expose containers by default\n      - --entrypoints.web.address=:80 # --entrypoints.\u003cname\u003e.address for ports, 80 (i.e., name = web)\n    ports:\n      - \"80:80/tcp\" # HTTP (web)\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock:ro\n    labels:\n      traefik.enable: true\n      # dashboard\n      traefik.http.routers.traefik.rule: Host(`traefik.localtest.me`)\n      traefik.http.routers.traefik.service: api@internal\n      traefik.http.routers.traefik.entrypoints: web\n      traefik.http.routers.traefik.middlewares: error-pages-middleware\n    depends_on:\n      error-pages: {condition: service_healthy}\n\n  error-pages:\n    image: ghcr.io/tarampampam/error-pages:3 # using the latest tag is highly discouraged\n    environment:\n      TEMPLATE_NAME: l7 # set the error pages template\n    labels:\n      traefik.enable: true\n      # use as \"fallback\" for any NON-registered services (with priority below normal)\n      traefik.http.routers.error-pages-router.rule: HostRegexp(`.+`)\n      traefik.http.routers.error-pages-router.priority: 10\n      # should say that all of your services work on https\n      traefik.http.routers.error-pages-router.entrypoints: web\n      traefik.http.routers.error-pages-router.middlewares: error-pages-middleware\n      # \"errors\" middleware settings\n      traefik.http.middlewares.error-pages-middleware.errors.status: 400-599\n      traefik.http.middlewares.error-pages-middleware.errors.service: error-pages-service\n      traefik.http.middlewares.error-pages-middleware.errors.query: /{status}.html\n      # define service properties\n      traefik.http.services.error-pages-service.loadbalancer.server.port: 8080\n\n  nginx-or-any-another-service:\n    image: docker.io/library/nginx:1.27-alpine\n    labels:\n      traefik.enable: true\n      traefik.http.routers.test-service.rule: Host(`test.localtest.me`)\n      traefik.http.routers.test-service.entrypoints: web\n      traefik.http.routers.test-service.middlewares: error-pages-middleware\n```\n\nAfter executing `docker compose up` in the same directory as the `compose.yml` file, you can:\n\n- Open the Traefik dashboard [at `traefik.localtest.me`](http://traefik.localtest.me/dashboard/#/)\n- [View customized error pages on the Traefik dashboard](http://traefik.localtest.me/foobar404)\n- Open the nginx index page [at `test.localtest.me`](http://test.localtest.me/)\n- View customized error pages for non-existent [pages](http://test.localtest.me/404) and [domains](http://404.localtest.me/)\n\nIsn't this kind of magic? 😀\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cstrong\u003e🚀 Kubernetes (K8s) \u0026 Ingress Nginx\u003c/strong\u003e\u003c/summary\u003e\n\nError-pages can be configured to work with the [ingress-nginx][ingress-nginx] helm chart in Kubernetes.\n\n- Set the `custom-http-errors` config value\n- Enable default backend\n- Set the default backend image\n\n```yaml\ncontroller:\n  config:\n    custom-http-errors: \u003e-\n      401,403,404,500,501,502,503\n\ndefaultBackend:\n  enabled: true\n  image:\n    repository: ghcr.io/tarampampam/error-pages\n    tag: '3' # using the latest tag is highly discouraged\n  extraEnvs:\n  - name: TEMPLATE_NAME # Optional: change the default theme\n    value: l7\n  - name: SHOW_DETAILS # Optional: enables the output of additional information on error pages\n    value: 'true'\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cstrong\u003e🚀 Kubernetes (K8s) \u0026 Ingress Traefik\u003c/strong\u003e\u003c/summary\u003e\n\nThere are various ways to set up \"error pages\" in Kubernetes with Traefik. One of the most common scenarios is when\nyou already have Traefik installed as an Ingress Controller with all the necessary CRDs. In this case, you still\nneed to install the \"error pages\" as a separate service, register a middleware that will use it, and apply this\nmiddleware to all relevant routers.\n\n\u003e To install Traefik using Helm, you may add the following lines to your `Chart.yaml` file:\n\u003e\n\u003e ```yaml\n\u003e dependencies:\n\u003e - name: traefik\n\u003e   version: 34.1.0 # change to the latest version\n\u003e   repository: https://helm.traefik.io/traefik\n\u003e ```\n\nI prefer to install each component in a separate namespace and use Helm to manage the installation process. So\nbefore we begin, let's define the following settings in the `values.yaml` file:\n\n```yaml\nerrorPages:\n  enabled: true\n  appName: error-pages\n  namespace: error-pages\n  version: 3.3.1 # https://github.com/tarampampam/error-pages/releases\n  themeName: shuffle\n```\n\nNext, create the following Helm chart templates:\n\n```yaml\n# file: error-pages/namespace.yaml\n\n{{ with .Values.errorPages }}\n{{- if .enabled }}\napiVersion: v1\nkind: Namespace\n\nmetadata: {name: \"{{ .namespace }}\"}\n{{- end }}\n{{- end }}\n```\n\n```yaml\n# file: error-pages/deployment.yaml\n\n{{ with .Values.errorPages }}\n{{- if .enabled }}\napiVersion: apps/v1\nkind: Deployment\n\nmetadata:\n  name: \"{{ .appName }}\"\n  namespace: {{ .namespace }}\n  labels: {app: \"{{ .appName }}\"}\n\nspec:\n  replicas: 1\n  selector: {matchLabels: {app: \"{{ .appName }}\"}}\n  template:\n    metadata: {labels: {app: \"{{ .appName }}\"}}\n    spec:\n      automountServiceAccountToken: false\n      containers:\n        - name: \"{{ .appName }}\"\n          image: \"ghcr.io/tarampampam/error-pages:{{ .version | default \"latest\" }}\"\n          env:\n            - {name: TEMPLATE_NAME, value: \"{{ .themeName | default \"app-down\" }}\"}\n          securityContext:\n            runAsNonRoot: true\n            runAsUser: 10001\n            runAsGroup: 10001\n            readOnlyRootFilesystem: true\n          ports:\n            - {name: http, containerPort: 8080, protocol: TCP}\n          livenessProbe:\n            httpGet: {port: http, path: /healthz}\n            periodSeconds: 10\n          readinessProbe:\n            httpGet: {port: http, path: /healthz}\n            periodSeconds: 10\n          resources:\n            limits: {memory: 64Mi, cpu: 200m} # change if needed\n            requests: {memory: 16Mi, cpu: 20m}\n{{- end }}\n{{- end }}\n```\n\n```yaml\n# file: error-pages/service.yaml\n\n{{ with .Values.errorPages }}\n{{- if .enabled }}\napiVersion: v1\nkind: Service\n\nmetadata:\n  name: {{ .appName }}-service\n  namespace: {{ .namespace }}\n  labels: {app: \"{{ .appName }}\"}\n\nspec:\n  type: ClusterIP\n  selector: {app: \"{{ .appName }}\"}\n  ports: [{name: http, protocol: TCP, port: 8080, targetPort: 8080}]\n{{- end }}\n{{- end }}\n```\n\n```yaml\n# file: error-pages/middleware.yaml\n\n{{ with .Values.errorPages }}\n{{- if .enabled }}\napiVersion: traefik.io/v1alpha1\nkind: Middleware\n\nmetadata:\n  name: {{ .appName }}\n  namespace: {{ .namespace }}\n\nspec: # https://doc.traefik.io/traefik/routing/providers/kubernetes-crd/#kind-middleware\n  errors:\n    status: [\"401\", \"403\", \"404\", \"500-599\"]\n    service: {name: \"{{ .appName }}-service\", port: 8080}\n    query: \"/{status}.html\"\n{{- end }}\n{{- end }}\n```\n\nIf everything was configured correctly, you should see the new middleware in your Traefik dashboard after applying\nupdated Helm chart:\n\n![traefik-dashboard-middleware](https://habrastorage.org/webt/dj/to/qy/djtoqy20fpi2_qqabzeyltwlenw.png)\n\nSince our middleware is in a separate namespace, and in Traefik \u003e=2.5 cross-namespace references for resources\nlike middlewares are restricted by default, we need to enable this feature. To do so, add the following lines to\nyour Traefik Helm chart values:\n\n```diff\n traefik:\n   # ...\n-  globalArguments: []\n+  globalArguments: [\"--providers.kubernetescrd.allowCrossNamespace=true\"]\n   # ...\n```\n\nNow, you can apply the middleware to the necessary ingress routes:\n\n```diff\n apiVersion: traefik.io/v1alpha1\n kind: IngressRoute\n\n metadata:\n   name: some-app-http\n   namespace: some-app\n\n spec: # https://doc.traefik.io/traefik/routing/providers/kubernetes-crd/#kind-ingressroute\n   entryPoints: [websecure]\n   routes:\n     - match: Host(`my.awesome-site.com`) \u0026\u0026 PathPrefix(`/`)\n       services: [{name: \"some-app-service\", namespace: some-app, port: 8080}]\n+      {{- with $.Values.errorPages }}{{ if .enabled }}\n+      middlewares: [{name: \"{{ .appName }}\", namespace: \"{{ .namespace }}\"}]\n+      {{- end }}{{ end }}\n```\n\nAlthough this approach is quite verbose, it allows for full control over the configuration. If you have a\nbetter alternative, feel free to submit a PR!\n\n\u003c/details\u003e\n\n## 🦾 Performance\n\nHardware used:\n\n- 12th Gen Intel® Core™ i7-1260P (16 cores)\n- 32 GiB RAM\n\nRPS: **~180k** 🔥 requests served without any errors, with peak memory usage ~60 MiB under the default configuration\n\n\u003cdetails\u003e\n  \u003csummary\u003ePerformance test details (click to expand)\u003c/summary\u003e\n\n```shell\n$ ulimit -aH | grep file\ncore file size              (blocks, -c) unlimited\nfile size                   (blocks, -f) unlimited\nopen files                          (-n) 1048576\nfile locks                          (-x) unlimited\n\n$ go build ./cmd/error-pages/ \u0026\u0026 ./error-pages --log-level warn serve\n\n$ ./error-pages perftest # in separate terminal\nStarting the test to bomb ONE PAGE (code). Please, be patient...\nTest completed successfully. Here is the output:\n\nRunning 15s test @ http://127.0.0.1:8080/\n  12 threads and 400 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency     4.52ms    6.43ms  94.34ms   85.44%\n    Req/Sec    15.76k     2.83k   29.64k    69.20%\n  2839632 requests in 15.09s, 32.90GB read\nRequests/sec: 188185.61\nTransfer/sec:      2.18GB\n\nStarting the test to bomb DIFFERENT PAGES (codes). Please, be patient...\nTest completed successfully. Here is the output:\n\nRunning 15s test @ http://127.0.0.1:8080/\n  12 threads and 400 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency     6.75ms   13.71ms 252.66ms   91.94%\n    Req/Sec    14.06k     3.25k   26.39k    71.98%\n  2534473 requests in 15.10s, 29.22GB read\nRequests/sec: 167899.78\nTransfer/sec:      1.94GB\n```\n\n\u003c/details\u003e\n\n\u003c!--GENERATED:CLI_DOCS--\u003e\n\u003c!-- Documentation inside this block generated by github.com/urfave/cli; DO NOT EDIT --\u003e\n## CLI interface\n\nUsage:\n\n```bash\n$ error-pages [GLOBAL FLAGS] [COMMAND] [COMMAND FLAGS] [ARGUMENTS...]\n```\n\nGlobal flags:\n\n| Name               | Description                           | Default value | Environment variables |\n|--------------------|---------------------------------------|:-------------:|:---------------------:|\n| `--log-level=\"…\"`  | Logging level (debug/info/warn/error) |    `info`     |      `LOG_LEVEL`      |\n| `--log-format=\"…\"` | Logging format (console/json)         |   `console`   |     `LOG_FORMAT`      |\n\n### `serve` command (aliases: `s`, `server`, `http`)\n\nPlease start the HTTP server to serve the error pages. You can configure various options - please RTFM :D.\n\nUsage:\n\n```bash\n$ error-pages [GLOBAL FLAGS] serve [COMMAND FLAGS] [ARGUMENTS...]\n```\n\nThe following flags are supported:\n\n| Name                         | Description                                                                                                                                                                                                                                                                                                               |               Default value               |    Environment variables    |\n|------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------:|:---------------------------:|\n| `--listen=\"…\"` (`-l`)        | The HTTP server will listen on this IP (v4 or v6) address (set 127.0.0.1/::1 for localhost, 0.0.0.0 to listen on all interfaces, or specify a custom IP)                                                                                                                                                                  |                 `0.0.0.0`                 |        `LISTEN_ADDR`        |\n| `--port=\"…\"` (`-p`)          | The TCP port number for the HTTP server to listen on (0-65535)                                                                                                                                                                                                                                                            |                  `8080`                   |        `LISTEN_PORT`        |\n| `--add-template=\"…\"`         | To add a new template, provide the path to the file using this flag (the filename without the extension will be used as the template name)                                                                                                                                                                                |                   `[]`                    |       `ADD_TEMPLATE`        |\n| `--disable-template=\"…\"`     | Disable the specified template by its name (useful to disable the built-in templates and use only custom ones)                                                                                                                                                                                                            |                   `[]`                    |           *none*            |\n| `--add-code=\"…\"`             | To add a new HTTP status code, provide the code and its message/description using this flag (the format should be '%code%=%message%/%description%'; the code may contain a wildcard '*' to cover multiple codes at once, for example, '4**' will cover all 4xx codes unless a more specific code is described previously) |                  `map[]`                  |           *none*            |\n| `--json-format=\"…\"`          | Override the default error page response in JSON format (Go templates are supported; the error page will use this template if the client requests JSON content type)                                                                                                                                                      |                                           |   `RESPONSE_JSON_FORMAT`    |\n| `--xml-format=\"…\"`           | Override the default error page response in XML format (Go templates are supported; the error page will use this template if the client requests XML content type)                                                                                                                                                        |                                           |    `RESPONSE_XML_FORMAT`    |\n| `--plaintext-format=\"…\"`     | Override the default error page response in plain text format (Go templates are supported; the error page will use this template if the client requests plain text content type or does not specify any)                                                                                                                  |                                           | `RESPONSE_PLAINTEXT_FORMAT` |\n| `--template-name=\"…\"` (`-t`) | Name of the template to use for rendering error pages (built-in templates: app-down, cats, connection, ghost, hacker-terminal, l7, lost-in-space, noise, orient, shuffle)                                                                                                                                                 |                `app-down`                 |       `TEMPLATE_NAME`       |\n| `--disable-l10n`             | Disable localization of error pages (if the template supports localization)                                                                                                                                                                                                                                               |                  `false`                  |       `DISABLE_L10N`        |\n| `--default-error-page=\"…\"`   | The code of the default (index page, when a code is not specified) error page to render                                                                                                                                                                                                                                   |                   `404`                   |    `DEFAULT_ERROR_PAGE`     |\n| `--send-same-http-code`      | The HTTP response should have the same status code as the requested error page (by default, every response with an error page will have a status code of 200)                                                                                                                                                             |                  `false`                  |    `SEND_SAME_HTTP_CODE`    |\n| `--show-details`             | Show request details in the error page response (if supported by the template)                                                                                                                                                                                                                                            |                  `false`                  |       `SHOW_DETAILS`        |\n| `--proxy-headers=\"…\"`        | HTTP headers listed here will be proxied from the original request to the error page response (comma-separated list)                                                                                                                                                                                                      | `X-Request-Id,X-Trace-Id,X-Amzn-Trace-Id` |    `PROXY_HTTP_HEADERS`     |\n| `--rotation-mode=\"…\"`        | Templates automatic rotation mode (disabled/random-on-startup/random-on-each-request/random-hourly/random-daily)                                                                                                                                                                                                          |                `disabled`                 |  `TEMPLATES_ROTATION_MODE`  |\n| `--read-buffer-size=\"…\"`     | Per-connection buffer size in bytes for reading requests, this also limits the maximum header size (increase this buffer if your clients send multi-KB Request URIs and/or multi-KB headers (e.g., large cookies), note that increasing this value will increase memory consumption)                                      |                  `5120`                   |     `READ_BUFFER_SIZE`      |\n| `--disable-minification`     | Disable the minification of HTML pages, including CSS, SVG, and JS (may be useful for debugging)                                                                                                                                                                                                                          |                  `false`                  |   `DISABLE_MINIFICATION`    |\n\n### `build` command (aliases: `b`)\n\nBuild the static error pages and put them into a specified directory.\n\nUsage:\n\n```bash\n$ error-pages [GLOBAL FLAGS] build [COMMAND FLAGS] [ARGUMENTS...]\n```\n\nThe following flags are supported:\n\n| Name                                        | Description                                                                                                                                                                                                                                                                                                               | Default value |  Environment variables |\n|---------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------:|:----------------------:|\n| `--add-template=\"…\"`                        | To add a new template, provide the path to the file using this flag (the filename without the extension will be used as the template name)                                                                                                                                                                                |     `[]`      |     `ADD_TEMPLATE`     |\n| `--disable-template=\"…\"`                    | Disable the specified template by its name (useful to disable the built-in templates and use only custom ones)                                                                                                                                                                                                            |     `[]`      |         *none*         |\n| `--add-code=\"…\"`                            | To add a new HTTP status code, provide the code and its message/description using this flag (the format should be '%code%=%message%/%description%'; the code may contain a wildcard '*' to cover multiple codes at once, for example, '4**' will cover all 4xx codes unless a more specific code is described previously) |    `map[]`    |         *none*         |\n| `--disable-l10n`                            | Disable localization of error pages (if the template supports localization)                                                                                                                                                                                                                                               |    `false`    |     `DISABLE_L10N`     |\n| `--index` (`-i`)                            | Generate index.html file with links to all error pages                                                                                                                                                                                                                                                                    |    `false`    |         *none*         |\n| `--target-dir=\"…\"` (`--out`, `--dir`, `-o`) | Directory to put the built error pages into                                                                                                                                                                                                                                                                               |      `.`      |         *none*         |\n| `--disable-minification`                    | Disable the minification of HTML pages, including CSS, SVG, and JS (may be useful for debugging)                                                                                                                                                                                                                          |    `false`    | `DISABLE_MINIFICATION` |\n\n### `healthcheck` command (aliases: `chk`, `health`, `check`)\n\nHealth checker for the HTTP server. The use case - docker health check.\n\nUsage:\n\n```bash\n$ error-pages [GLOBAL FLAGS] healthcheck [COMMAND FLAGS] [ARGUMENTS...]\n```\n\nThe following flags are supported:\n\n| Name                | Description                                   | Default value | Environment variables |\n|---------------------|-----------------------------------------------|:-------------:|:---------------------:|\n| `--port=\"…\"` (`-p`) | TCP port number with the HTTP server to check |    `8080`     |     `LISTEN_PORT`     |\n\n\u003c!--/GENERATED:CLI_DOCS--\u003e\n\n## 🦾 Contributors\n\nI want to say a big thank you to everyone who contributed to this project:\n\n[![contributors](https://contrib.rocks/image?repo=tarampampam/error-pages)][contributors]\n\n[contributors]:https://github.com/tarampampam/error-pages/graphs/contributors\n\n## 👾 Support\n\n[![Issues][badge-issues]][issues]\n[![Issues][badge-prs]][prs]\n\nIf you encounter any bugs in the project, please [create an issue][new-issue] in this repository.\n\n[badge-issues]:https://img.shields.io/github/issues/tarampampam/error-pages.svg?maxAge=45\n[badge-prs]:https://img.shields.io/github/issues-pr/tarampampam/error-pages.svg?maxAge=45\n[issues]:https://github.com/tarampampam/error-pages/issues\n[prs]:https://github.com/tarampampam/error-pages/pulls\n[new-issue]:https://github.com/tarampampam/error-pages/issues/new/choose\n\n## 📖 License\n\nThis is open-sourced software licensed under the [MIT License][license].\n\n[license]:https://github.com/tarampampam/error-pages/blob/master/LICENSE\n\n[ingress-nginx]:https://github.com/kubernetes/ingress-nginx/tree/main/charts/ingress-nginx\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarampampam%2Ferror-pages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftarampampam%2Ferror-pages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarampampam%2Ferror-pages/lists"}