Cannot disable ssl with discourse-setup (initial simple docker)

AI-generated summary

In a discussion about Docker-based Discourse installation, ecki reports that when no Let’s Encrypt email is provided during setup (intending to use a reverse proxy), the system still enables SSL templates (web.ssl.template.yml and web.letsencrypt.ssl.template.yml), causing nginx to loop trying to fetch certificates. Manually disabling those templates allows HTTP-only operation, but breaks ./discourse-setup, which then complains the templates are “already enabled.” ecki also notes that entering “OFF” at the prompt works, but setting it in the YML file fails — suggesting the setup should validate existing values or allow empty fields. They argue that if no Let’s Encrypt email is given, SSL templates should not be enabled by default, or at least should not block nginx if certificates are missing. Falco responds that the default discourse-setup wizard assumes HTTPS is always enabled and recommends manual app.yml configuration for non-standard setups. ecki replies that, in that case, the “OFF” option should be removed from the prompt and the behavior when no Let’s Encrypt account is specified should be clarified — since the wizard currently implies it won’t use Let’s Encrypt if no email is provided, which contradicts its actual behavior.

Hello,

when I install the simple docker scenario and enter no Let’s encrypt email (because I have a reverse proxy) the resulting installation does not start because it loops in getting the certificate in nginx. I would expect that it does not “comment in” the web.ssl.template and web.letsencrypt, but it does. If i manually remove them and rebuild then it will start with http only as expected.

# - "templates/web.ssl.template.yml"
# - "templates/web.letsencrypt.ssl.template.yml"

However then the ./discourse-setup does no longer work. It complains about the templates “already enabled”…

Also, i can enter “OFF” at the prompt (if a non default letsencrypt notify mail was given), but if i enter it in the YML file the setup does not like it. (It should probably not only check the input but also the current/old value for OFF or at least allow to keep the option empty).

And in case of off (or empty default) it should not enable the letsencrypt and ssl templates, right - or make the tempülates not block the nginx startup if the certificates are empty).

Our default discourse-setup wizard is for standard installs where HTTPS will always be enabled. If you need a different setup you need to manually configure the app.yml file to your specific needs.

In that case you should probably remove the “OFF” handling and clarify the case when you specify no lets encrypt account, since it claims it wont use it in that case.