How Do I Upgrade?
The big advantage of the 2-container installation is that you can build a new container while the old container keep running, this minimizing down time, as it is limited to the time that it takes the new container to crank up. Here’s what to do.
First, you need to log in to your server. An easy way to do that is through the Digital Ocean console. The username is “root” and the password is in the email you received when your droplet was created. The password will not echo when you paste it, so just hit return after you paste.
Once you’re logged in, you’ll do this:
cd /var/discourse git pull ./launcher bootstrap web_only && ./launcher destroy web_only && ./launcher start web_only
It takes 10-60 seconds for the new container to boot up. You’ll see a 502 error for the first little bit.
If something goes wrong in the
bootstrap process your old container will continue running and you can work out whatever the problem is (an errant plugin?) without the trauma of having your site down.
How do I run a
If you’re following instructions on https://meta.discourse.org/ and it says to do a
./launcher enter app
./launcher ANYTHING app
you should replace
data.yml do I need to update it?
Not very often; Postgres upgrades typically happen less than once a year (they usually skip every other major release) and even when an upgrade becomes supported, it is even longer before an old version of Postgres is no longer supported. If you do need to upgrade, you should get some kind of notification or have your web container rebuild. If you do need to upgrade the data container, you’ll do a simple
./launcher rebuild data
There is no harm in doing a data container rebuild. Note that Discourse cannot function without its database, so your site will be down while the database container is rebuilt. You may need to restart the web container to have it re-connect to the new database.
I have a
napp.yml in my
containers directory. Should it be running?
No. That is your old
app.yml file, which I renamed
napp.yml (like not
app.yml, a bit too clever and confusing). In the future, I’ll rename this something like
app.old to hopefully minimize confusion.