Docker constantly restarting after turning off ipv6 no longer running on the host

Not able to locate a solution here. I disabled ipv6 on the host and the discourse docker keeps restarting.

I rebuilt the app
— snip —
cd /var/discourse
./launcher rebuild app
— snip —

Here is what docker log shows. Looks like Address family not supported by protocol

---- snip —

Blockquote
[Sun 02 Apr 2023 06:46:23 PM UTC] Reload error for :
nginx: [error] open() “/run/nginx.pid” failed (2: No such file or directory)
run-parts: /etc/runit/1.d/letsencrypt exited with return code 1
run-parts: executing /etc/runit/1.d/00-ensure-links
run-parts: executing /etc/runit/1.d/00-fix-var-logs
run-parts: executing /etc/runit/1.d/01-cleanup-web-pids
run-parts: executing /etc/runit/1.d/anacron
run-parts: executing /etc/runit/1.d/cleanup-pids
Cleaning stale PID files
run-parts: executing /etc/runit/1.d/copy-env
run-parts: executing /etc/runit/1.d/letsencrypt
nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
[Sun 02 Apr 2023 06:47:24 PM UTC] Domains not changed.
[Sun 02 Apr 2023 06:47:24 PM UTC] Skip, Next renewal time is: Tue 02 May 2023 11:52:23 PM UTC
[Sun 02 Apr 2023 06:47:24 PM UTC] Add ‘–force’ to force to renew.
[Sun 02 Apr 2023 06:47:24 PM UTC] Installing key to:/shared/ssl/<domain_removed>.key
[Sun 02 Apr 2023 06:47:24 PM UTC] Installing full chain to:/shared/ssl/<domain_removed>.cer
[Sun 02 Apr 2023 06:47:24 PM UTC] Run reload cmd: sv reload nginx
fail: nginx: runsv not running
[Sun 02 Apr 2023 06:47:24 PM UTC] Reload error for :
[Sun 02 Apr 2023 06:47:25 PM UTC] Domains not changed.
[Sun 02 Apr 2023 06:47:25 PM UTC] Skip, Next renewal time is: Tue 02 May 2023 11:52:26 PM UTC
[Sun 02 Apr 2023 06:47:25 PM UTC] Add ‘–force’ to force to renew.
[Sun 02 Apr 2023 06:47:25 PM UTC] Installing key to:/shared/ssl/<domain_removed>_ecc.key
[Sun 02 Apr 2023 06:47:25 PM UTC] Installing full chain to:/shared/ssl/<domain_removed>_ecc.cer
[Sun 02 Apr 2023 06:47:25 PM UTC] Run reload cmd: sv reload nginx
fail: nginx: runsv not running
[Sun 02 Apr 2023 06:47:25 PM UTC] Reload error for :
nginx: [error] open() “/run/nginx.pid” failed (2: No such file or directory)
run-parts: /etc/runit/1.d/letsencrypt exited with return code 1

Why tho?

Nginx can’t boot because you broke it by disabling IPv6.

You will need to manually edit the web template locally if you want it this way.

Is there a doc that explains exactly what needs to changed in the web template please?

You can look at the web template as an example of how templates work and also find the bit that includes the ipv6 part.

If you don’t know how then it’ll be easiest just to enable ipv6. But you could Google stuff like “nginx enable ipv6” to see what stuff to remove.