Closed deffcolony closed 3 weeks ago
Hello there,
Thank you for providing a detailed explanation of your issue! Currently, I'm working on a new major version of error-pages. Once the work is complete, I'll ping you here, and I hope you'll be pleasantly surprised by the new approach to handling custom templates 😉
Hello there,
Thank you for providing a detailed explanation of your issue! Currently, I'm working on a new major version of error-pages. Once the work is complete, I'll ping you here, and I hope you'll be pleasantly surprised by the new approach to handling custom templates 😉
Does this mean that this was kinda useless of me? https://github.com/Its4Nik/NGX-Error
I added a custom github action that builds every theme there is and pushes it to ghcr.io
Does this mean that this was kinda useless of me?
¯\ (ツ) /¯
Even if you only found your solution useful - it makes sense, right?
Does this mean that this was kinda useless of me?
¯\ (ツ) /¯
Even if you only found your solution useful - it makes sense, right?
Yeah ig :)
I could try to answer your question at https://github.com/tarampampam/error-pages/issues/288#issuecomment-2208654728 here
How can I configure my Traefik and replicate this into the new V3 error-pages docker container setup so that the static assets for the error pages are served correctly without being 403 forbidden? Any insights or suggestions would be greatly appreciated.
The error-pages project was designed to operate with error pages as single HTML pages, without loading additional resources from additional css
or js
files. This constraint simplifies deployment and usage, avoiding the challenges you've encountered.
The
compose.yml
file in this repository is intended only for local development and testing. Please do not refer to it when looking for solutions to use the project in your actual use case.
Is it possible for you to embed the content of every css
and/or js
file into a single HTML file, including images and everything you need for your error pages? If so, this might solve your problem (if I understood it correctly). You can then mount your template and specify the error-pages to use it, as mentioned in the readme file.
Is there an existing issue for this?
Describe the problem to be solved
Currently, configuring error pages in Docker containers requires manual adjustments to the entrypoint script and ensuring proper permissions for mounted directories. Users need a streamlined way to mount volumes for error page templates, HTML, and configuration files, allowing easy customization and configuration without modifying the container's filesystem or rebuilding the image. Additionally, users should have shell access with docker exec to manage files if needed
Suggest a solution
Implement support for Docker volumes in the docker-entrypoint.sh script and Dockerfile to allow users to mount local directories to the container. This can be achieved by modifying the entrypoint script to handle symbolic links and permissions, and updating the Dockerfile to ensure proper setup. The following changes are suggested:
/config/templates
,/config/html
, and/config/error-pages.yml
are writable by the container user.Additional context
The following is a proposed Dockerfile and docker-entrypoint.sh script to support volume mounting and to support shell access:
dockerfile changes
dockerfile full output
docker-entrypoint.sh
Make sure to add docker-entrypoint.sh to the .dockerignore file
.dockerignore
By following this approach, users can mount volumes with the docker compose file:
docker-compose.yml