I’ve been facing challenges with my Discourse setup:
YAML File and Syntax:
I’ve verified my YAML configuration using YamlLint; it didn’t flag any issues.
However, a syntax error popped up from a Ruby directory:
/usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/config.rb:148:in `block (2 levels) in run_commands': Invalid run command cd (SyntaxError)
...
from /usr/local/bin/pups:25:in `<main>'
Rebuild and Access:
I reverted to the default app.yml file and made some modifications. The rebuild was successful.
Yet, when I try accessing the site, I encounter these errors:
If you’re starting from scratch, you should try installing a fresh instance using a new subdomain. That should sidestep the letsencrypt rate limit if you’ve hit it.
Having cloudflare in front of your site is one way to see that let’s encrypt fails. I’d recommend using DNS-only until you’re sure that let’s encrypt is working correctly.
It sounds like the easy solution is to move to a different subdomain, or wait a week until let’s encrypt will give you a cert. The harder way is to add a second subdomain that points to your server and modify your app.yml to request a cert for both subdomains. Set up Let’s Encrypt with multiple domains. Since it appears that your problems started because you’re having trouble with YML formatting, this rather complicated solution might not work for you.
Latest Update: Post-execution of discourse-setup , navigating to home.techwithanirudh.com results in a “502 Bad Gateway” error. Here’s a snapshot of the error (referring to the attached image).
The giveaway here (atm) was the 502 due to the container not starting properly due to the index remaining in the db without supporting code in the postgres library. The uninstall instructions remove the index from the db so you can safely build without building the index library.