heroku/heroku-buildpack-nginx

Hot reload of configuration

amarchbanks opened this issue · 7 comments

Please could someone help with indicating if it is possible to hot reload the configuration with this build pack?

I’m trying to achieve updating the configuration without having to restart the dyno.

Any help would be greatly appreciated!

Anyone ideas? Thanks.

i don't think is possible, can you maybe share a little more about your use-case?

Thanks! I’m looking into doing blue green deployments on Heroku and reloading the configuration without having to redeploy the app to get new configuration loaded. My idea was to reload the configuration to update which is the green and blue servers as part of the CICD process.

Where does the new configuration come from, is it persisted somewhere? will it be generated? what would happen if the dyno reboots?

My idea was to include two identical versions of the configuration to switch between blue/green and then run a script which can flip between them. So once the script has been invoked the current configuration file would be replaced with either the blue or green version. At this moment I need to reload the configuration in NGinx. Does this make sense or do you know of a more suitable approach?

you can tell nginx to reload it's config, i believe it's nginx -s reload. Have you tried that?

@beanieboi I opened up a bash shell into the dyno and indeed could run the above command. Thanks for your help!