Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manage nginx configuration in Dockerfile/entrypoint.sh with the new built-in templating of the nginx image? #141

Open
mattock opened this issue Sep 24, 2024 · 2 comments

Comments

@mattock
Copy link

mattock commented Sep 24, 2024

Nginx image versions from 1.19 onward have support for built-in templating, see "Using environment variables in nginx configuration (new in 1.19)" in https://hub.docker.com/_/nginx.

This could be used to replace the rather complex templating done with sed in entrypoint.sh. Just copy the desired configuration files to /etc/nginx/templates, add a ".template" suffix to them and use environment variables in the with ${myvar} them.

@redimp
Copy link
Owner

redimp commented Sep 25, 2024

I agree, this would be a great improvement! A pull request would be very welcome.

Side note: At the moment I'm thinking about whether nginx should be part of the image at all. The image build from docker/Dockerfile.slim has been tested successfully and might be the way to go.

@mattock
Copy link
Author

mattock commented Sep 27, 2024

I agree, this would be a great improvement! A pull request would be very welcome.

Ok, I'll look into it!

Side note: At the moment I'm thinking about whether nginx should be part of the image at all. The image build from docker/Dockerfile.slim has been tested successfully and might be the way to go.

I suppose nginx is not really needed for development setups. My production setup has nginx + letsencrypt, so there it makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants