Comments (5)
Beautiful! Of course, thank you!
from error-pages.
What is the use case for this? Why do not use the ready templates?
from error-pages.
For instance I prefer to have a more human-friendly maintenance message for 502 and 503. Also, somebody might prefer corporate templates which wouldn't fit a generic project.
from error-pages.
For instance I prefer to have a more human-friendly maintenance message for 502 and 503. Also, somebody might prefer corporate templates which wouldn't fit a generic project.
Tbf, all you'd need to do there is modify the config.json file and build the project, and you could have the custom message of your choice.
The HTML files are built during the dockerfile build stage, so not quite sure how @tarampampam would be able to put env variables in. Only way I can think of is via Nginx's http_sub_module - but that's massively processor intensive if not careful.
It makes more sense to simplify it and edit the config.json and have several images depending on your use case.
Or if you really need variables, just put in some build_args.
It takes about 20 seconds to build a new image.
from error-pages.
@yajo Hi there again! Sorry for the late response - I needed time to rewrite the whole application on go :)
Since v2.0.0 you can override the content of the templates. For example, now you can override the ghost
template content on your choice:
Lines 5 to 7 in 29f024e
# docker-compose.yml
version: '3.2'
services:
error-pages:
image: ghcr.io/tarampampam/error-pages:2.0.0
environment:
TEMPLATE_NAME: ghost
GHOST_TEMPLATE_CONTENT: >
<html>
<body>{{ code }} - {{ message }}</body>
</html>
ports:
- "8080:8080/tcp"
$ docker-compose up
This issue can be closed now? :)
from error-pages.
Related Issues (20)
- GDPR - Replace Google Fonts by Bunny Fonts HOT 1
- The DockerHub has the wrong project description HOT 1
- Can we add the possibility of inline translation using Accept-Language header?
- Turn off logs HOT 6
- Custom env variables to be used in templates HOT 3
- Healthcheck fails after update to 2.20.0 HOT 11
- CPU spikes HOT 6
- Not found returns 405 if methods are POST/DELETE etc.. HOT 7
- Redirect missing requests to default status page HOT 5
- Support IPv6 HOT 5
- HTTP status code not set per code template HOT 3
- Custom static-pages ( no error pages, but default-backend related )
- Add "Retry-After" header support
- Custom 404 page
- IP Restricted additional information
- "Too big request header" HOT 7
- cross origin request to fonts.bunny.net fails HOT 2
- Pass through error message and/or error description from response body HOT 1
- Docker Image for 2.27.0 failed to build HOT 1
- Use numeric user id to be compatible with Kubernetes Pod Security Policies HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from error-pages.