Closed peterjaap closed 6 years ago
Found a workaround;
cp -R /data/web/nginx/ssl /etc/nginx/app/ssl
cat /etc/my_init.d/60_restart_services.sh | grep nginx > restart_nginx.sh && bash restart_nginx.sh && rm restart_nginx.sh
It seems that the files from ~/nginx
aren't read at all.
Perhaps this has something to do with inotify in the docker fs, I'm pretty sure that doesn't work. There's a periodic cron to run /usr/bin/nginx_config_reloader
manually to work around that, but if you're scripting against the system and expecting the inotify handler to trigger it when something is written to /data/web/nginx like it is on a real hypernode (or a Virtualbox vagrant, probably also doesn't work in lxc), the cron is not fast enough. Does it work if you run /usr/bin/nginx_config_reloader
manually? Also see https://github.com/ByteInternet/nginx_config_reloader
@vdloo right! Yes, that does the trick. That seems to copy the content of /data/web/nginx
to /etc/nginx/app
. I'll just run /usr/bin/nginx_config_reloader
after hypernode-ssl-config-generator
. Thanks! :+1:
Edit; haha second sentence in the readme of the nginx_config_reloader repo :joy:
The nginx config does not seem to reload when I change a file in
~/nginx/
. Sanity check; when I add a file there with a deliberate mistake, on a production Hypernode this is what I'm getting;But when I do this in the Hypernode container, nada;
Also after restarting the nginx service, nothing happens;