Does web based updates replace rebuilding the container?

I have been doing web based upgrades at admin/upgrade and since I tend to have very high up times, does this replace replace the updates that are done when rebuilding the container with ./launcher rebuild?

Also, when I reboot does the container auto-update itself?

Thanks!

Majority of your updates can be done via the web, once in a few months you need to rebuild to get updates to the base image. If we deem it critical we will force it upon you.

4 Likes

I was just upgrading stuff, and what a timing! I got a error

Discourse requires Ruby 2.5.2 or up
Docker Manager: FAILED TO UPGRADE
#<RuntimeError: RuntimeError>

So I guess I’ll stick to rebuilding every week or so. The downtime is bad, but I don’t need to be up 99,9% of the time.

1 Like

Oh … we got to force a rebuild here I just fixed that so others do not see this issue.

5 Likes

I don’t know if I’m doing something wrong, but I tried to do a rebuild via terminal and I’m getting this:

error: Your local changes to the following files would be overwritten by merge:
        templates/import/mbox.template.yml
        templates/web.ssl.template.yml

But I don’t use those templates, and I do not interact with templates files. I delete them and can proceed, but any idea why this could be happening?

And I’m not sure if you were being sarcastic, I have no reason to lie or anything…

cd /var/discourse
git reset --hard
git pull
./launcher rebuild app
3 Likes

Ok I’m trying to automate this, with a cronjob to rebuild the container after every reboot.

@reboot sleep 300 && /opt/discourse/launcher rebuild app > /root/discord-update.log

It seems to be working, but for some reason the log file get cut after Removing old container.

Is there some kind of recommended way to get automatic updates working?

I had to wait 300 seconds for the docker daemon to start. With this settings it should take 10 min after reboot to be back on air. Rebuilding takes 5 min with a SSD and 2 vCPU.

If you’re concerned about uptime, you should switch to a two container install.

3 Likes

For some reason the output of my script stops redirecting to the file… is there a guide on this two container install?

5 min of downtime every month is still like 99,5% uptime so unless the two container install is easy to do/manage it doesn’t worth it…

For a description see: How to move from standalone container to separate web and data containers.

For a normal rebuild/upgrade It’s pretty much the same as a single container install. Rather than

./launcher rebuild app

you do

./launcher bootstrap web_only && ./launcher destroy web_only && ./launcher start web_only
5 Likes

I’m getting ready to migrate to separate data containers as described above.

When upgrading, do I ever need to update the data container? If so, when?

Also, can I assume the web container upgrade process will make necessary changes to the data tables, etc?

When there is a change to postgres or redis. Knowing when this has happened is a matter of keeping track of things and is the reason that many people think that the two container setup is too hard. I have scripts that check postgres and redis versions and upgrade the data container if a change has been made. Those changed happen every year or two, though sub-base upgrades happen a bit more often. Generally if you don’t upgrade from 13.1 to 13.5 it won’t matter much.

Yes.

1 Like

This topic was automatically closed after 15 days. New replies are no longer allowed.