A user, cfstras, reported an issue after updating to v1.2, where their instance wouldn’t start due to a duplicate location “/backups/” in the discourse.conf file. The issue was caused by a commit being merged twice.
A temporary fix was suggested, which involved switching to the “latest-release” branch. However, this introduced another error related to site customization. sam updated the stable branch with a fix and suggested running a migration to resolve the site customization issue.
cfstras shared a workaround, which involved manually running a migration, rebuilding the standalone app, and restarting the instance. However, sam noted that a simpler solution would have been to run ./launcher rebuild app.
After updating (which also told me to update my docker container, since I was on 1.0 until now), my instance won’t come back up. ./launcher logs tells me: nginx: [emerg] duplicate location "/backups/" in /etc/nginx/conf.d/discourse.conf:79 <message repeats ad infinitum>
Unfortunately, a commit seems to have sneaked in twice while merging:
nginx doesn’t like that. Is there any way to get that fixed on the stable branch?
Thanks in advance!
For anyone having similar problems and really want to use my solution:
./launcher ssh nt
cd /var/www/discourse
rake db:migrate
# check website and panic because it's still 500ing
^D
mv shared/standalone shared/standalone_old
mkdir shared/standalone
./launcher rebuild standalone
# wait...
# check and see: it's working again, but with an empty db, as expected
./launcher stop standalone
mv shared/standalone_old shared/standalone
./launcher start standalone
# heyaa, it's back!