The proper way to restart nginx inside the Discourse docker container is to use the sv
command, which is part of the runit
service supervisor.
root@osestaging1-discourse-ose:/var/www/discourse# sv stop nginx
ok: down: nginx: 1s, normally up
root@osestaging1-discourse-ose:/var/www/discourse# sv start nginx
ok: run: nginx: (pid 269) 0s
root@osestaging1-discourse-ose:/var/www/discourse#
So it looks like Ruby on Rails uses runit
I found the sv
command as it’s referenced in the templates/web.template.yml file