Discourse setup script hostname validation for Let's Encrypt

Commentary on why this change was needed in the first place

First, I’m surprised that in the nearly 3 months since this has been this way there haven’t been lots of complaints, and even the topic that brought this to my attention wasn’t having trouble because of this change, so maybe it matters much less than I think.

The first thing that I don’t really understand is, you guys really want to make it so that it’s impossible to set up an http-only site with discourse-setup? I guess they have to have done a bunch of DNS stuff to make mail work already, so maybe it’s not that big a problem to have them create the A record too.

Feedback on the change

Unless you made a change that I haven’t noticed, the script creates app.yml before it starts asking questions, so you could just say something like “Discourse installation without DNS configuratoin is not supported. To continue without DNS configuration, edit app.yml to suit your needs and run ./launcher rebuild app” and then quit without bootstrapping.

Also, if you’re going to enforce everyone-has-to-use-let’s-encrypt-and-https, then it might make sense to change standalone.yml and web_only.yml accordingly and then those fiddly sed statements could be removed.

More musings

From the this-is-my-problem department, my current install script runs before people can set up DNS, as I create the droplet for them, set up Discourse, send them an email with DNS instructions, wait for DNS to be set up, and then modifies app.yml to enable the templates and set the let’s encrypt address. But I guess that’s just for historical reasons, what I should do instead is create the droplet, configure mailgun, wait for DNS, then do the installation, that would still let my script use discourse-setup, which I like doing as a frequent test that it’s still working (I don’t think that you guys are doing an automated test of discourse-setup are you?)