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

Challenges fail when using envsubst template for nginx configuration. #141

Open
SolnLase opened this issue Jun 5, 2023 · 1 comment
Open

Comments

@SolnLase
Copy link

SolnLase commented Jun 5, 2023

I've come across an issue where challenges didn't pass. After experimenting for a while I found out that binding nginx template file to a template file in /etc/nginx/templates/, except for just including a normal conf file in conf.d is causing this issue. How can I rewrite this script so it works with envsubst templates for conf files in conf.d?

@pmeaney
Copy link

pmeaney commented Mar 17, 2024

HI @SolnLase check out this example I setup, using @wmnnd 's initial example.

I think taking a look at it will solve your question.

https://github.com/clicksandcodes/ccc-nginx-certbot/

It uses envsubst and nginx conf templates. I also template-ized the project's shell file.
Edit the .env file to add your preferred domain or IP address.
In four commands (their env var needs editing as well-- to add your domain or the IP, and your email address), you can get an http & https endpoint running.

the endpoints will be:

  • http://yourDomain.com/healthcheck
  • https://yourDomain.com/healthcheck

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