Wie startet man nginx innerhalb des Discourse-Docker-Containers korrekt?
Der Docker-Container scheint Debian 10 zu verwenden, aber der übliche systemd-Ansatz zum Neustarten von nginx schlägt fehl
[root@osestaging1 discourse]# ./launcher enter discourse_ose
root@osestaging1-discourse-ose:/var/www/discourse# cat /etc/issue
Debian GNU/Linux 10 \n \l
root@osestaging1-discourse-ose:/var/www/discourse# systemctl restart nginx
System wurde nicht mit systemd als Init-System (PID 1) gestartet. Keine Operation möglich.
Verbindung zum Bus fehlgeschlagen: Host ist nicht erreichbar
root@osestaging1-discourse-ose:/var/www/discourse#
Es scheint ein init.d-Skript zu geben, aber dessen Ausführung schlägt ebenfalls fehl. Die Logs besagen, dass dies daran liegt, dass es nicht an eine Adresse binden kann, die bereits in Verwendung ist.
root@osestaging1-discourse-ose:/etc/nginx/conf.d# /etc/init.d/nginx restart
[FAIL] Neustart von nginx: nginx fehlgeschlagen!
root@osestaging1-discourse-ose:/etc/nginx/conf.d# tail /var/log/nginx/error.log
2019/11/12 10:32:45 [emerg] 1123#1123: bind() to unix:/shared/nginx.http.sock failed (98: Address already in use)
2019/11/12 10:32:45 [emerg] 1123#1123: bind() to unix:/shared/nginx.http.sock failed (98: Address already in use)
2019/11/12 10:32:45 [emerg] 1123#1123: bind() to unix:/shared/nginx.http.sock failed (98: Address already in use)
2019/11/12 10:32:45 [emerg] 1123#1123: bind() to unix:/shared/nginx.http.sock failed (98: Address already in use)
2019/11/12 10:32:45 [emerg] 1123#1123: bind() to unix:/shared/nginx.http.sock failed (98: Address already in use)
2019/11/12 10:32:45 [emerg] 1123#1123: still could not bind()
2019/11/12 10:32:47 [emerg] 1127#1127: bind() to unix:/shared/nginx.http.sock failed (98: Address already in use)
2019/11/12 10:32:47 [emerg] 1127#1127: bind() to unix:/shared/nginx.http.sock failed (98: Address already in use)
2019/11/12 10:32:47 [emerg] 1127#1127: bind() to unix:/shared/nginx.http.sock failed (98: Address already in use)
2019/11/12 10:32:47 [emerg] 1127#1127: bind() to unix:/shared/nginx.http.sock failed (98: Address already in use)
Tatsächlich läuft nginx bereits
root@osestaging1-discourse-ose:/etc/nginx/conf.d# ps -ef | grep -i nginx
root 46 40 0 10:19 ? 00:00:00 runsv nginx
root 1174 46 1 10:33 ? 00:00:00 /usr/sbin/nginx
root 1177 108 0 10:33 pts/1 00:00:00 grep -i nginx
root@osestaging1-discourse-ose:/etc/nginx/conf.d#
Wie tötet man den oben genannten nginx-Prozess ordnungsgemäß und startet ihn erneut?