Here is one I cannot figure out after many flawless Discourse installs and migrations.
We had Discourse running well in a Docker container and were working on some postgres DB nuances.
The issue happened when we were not happy with the cooked results of rebaking raw posts, and so, nothing was working as planned, so we decided to drop the
postgres DB and recreate it; but the app kept giving various permissions errors, etc.
Then, we decided “lets go hard core” and decided to clobber it in “what the heck” style; and we just went in to
postgres (knowing this would not work out well, but wanting to try) and deleted all the
posts from the DB (
DELETE FROM topics; DELETE FROM posts;). This kinda worked; but we were not happy with the results (experiment over), so we decided to rebuild discourse from scratch, moving the old
/var/discourse out of the way, and pulling from
git for a fresh start.
When we build totally
new from a
git pull, it worked fine (the build) up until the part where we go to the site to create the admin login.
When we went to the admin login for a new install, it was the old site we destroyed! This was a surprise.
So we decided to go into this new app and try dropping all discourse tables from the DB, which we did; but, surprise, when we rebuilt the app again, it is not a fresh site, but the same broken site from above.
So, we deleted all
/var/*discourse* directories; and removed all docker
images. thinking this would be
totally clean and started anew pulling from
/var/discourse again and building from what we thought was
total scratch; but surprise… the old site is still there.
Thinking, “how could this be”…??
We did a
ps aux | grep postgres outside the docker container and noticed
postgres existed outside the container (which as a surprise, as we mistakenly thought the
discourse docker install was all in the docker container); and so then tried to find where to clean up, but no joy.
We searched until Google links have turned purple, and tried so much… but we cannot get a clean install of
Thinking we were missing something, we got on a new,
never installed discourse server, and installed
discourse from scratch, and it worked flawlessly as usual (another server).
My question is, I guess… when an install has totally gone off the rails (by hook or by crook), how do we get the server, including
postgres back to ground zero so this problem will go away and we can get a completely fresh new install going?
Sorry for such a long post, when The Question might have been enough to get help.