What's the correct way to reset instance?


#1

Hi, first post here, I’m new to discourse.

I wanted to reset my installation completely so tried

./launcher stop sd2016
rm -rf /var/discourse
./launcher bootstrap sd2016
./launcher start sd2016

It starts okay, but logs show nginx can’t write to its logfile - dir doesn’t exist so:

mkdir /var/discourse/shared/standalone/log/var-log/nginx

And all is fine. Is this a bug or is rm -rf /var/discourse the wrong way to go about resetting my instance?

Thanks
JH


(Sam Saffron) #2

this is a bit confusing… /var/discourse is meant to have the source of discourse docker, you don’t want to rm that. This indicates you checked out discourse to a custom location.

to reset everything I would …

cd /var/discourse
./launcher destroy app
rm -rf /var/discourse/shared
./launcher rebuild app

#3

Thanks Sam. Does that mean I have a broken installation - how should I go about repairing it? I assumed ./launcher would be self-healing with all the git-pulls!


(Jeff Atwood) #4

You can git pull it again as needed following the setup instructions.


#5

Ah - that explains the confusion … I’d done my initial git clone into my home directory so launcher was ~/discourse/launcher . That’ll be why I still had a launcher after removing /var/discourse . Thanks for your help!