-
Notifications
You must be signed in to change notification settings - Fork 789
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
Test nginx config before deploying #24
Comments
hey, i really like that idea, would you be able to come up with a PR to implement the changes? ben |
i just had another look into this and i don't think it's possible. we need to evaluate the config.erb to get the value for the $PORT and probably other environment variables. this means we only have the full complete config during dyno boot up and not during the build phase. i'm not sure how we can evaluate a partial config. |
@beanieboi, maybe at least before deployment? I was trying to use gunzip (#26) and couldn't understand the reason for failing deployment. |
Could this test be done in the |
I'm not 100% sure on Heroku's flow and that exiting during launch script will stop build from being rolled out. But if it is like that, this PR should do the job |
It will not. During the build we only copy the needed files into your app (see https://github.com/heroku/heroku-buildpack-nginx/blob/master/bin/compile) If we do this in the |
if there were a way to run this locally, that might allow us to catch config errors before it even hits heroku. is that at all a possibility? |
Customise the official nginx Docker image using your own Dockerfile with your own environment variables in it:
|
Is it possible to test the nginx config for errors with
nginx -t
before deploying? I've deployed a few bad builds of a proxy server (still in development, thankfully, so it didn't impact any production services) due to a bad config.The text was updated successfully, but these errors were encountered: