Upgrade container - keeping config and data

Hello community,

I am feeling really bad that I didn‘t find this information, which I consider as really basic. Actually it is not about getting it up and running for the first time, but this category appears to me as closest cousin to my question.

Q: how to upgrade an existing installation through Docker?
Background: I have used the in-app „update“ feature, which killed my Discourse instance. (I could specify if required).
I am using a Debian 1-2 yrs old on a virtual host in the cloud (Hetzner).

So what I am looking for is to download a recent Docker image, build a container, but not losing my configuration (and data or course). I am not very skilled in Docker, so I do not trust myself to dive into it on my own.

I guess it is pretty simple, as this is part of the principle to use (unmutable or stateless) containers.

Thank you for your support.

Thomas

1 Like
3 Likes

Thank you!

Are the steps the same compared to first install? Do you know some how-to on these steps?

FYI: I ran the software update from inside the admin panel - this couldn’t complete and killed my installation. Rollback did not work.

Thx
Thomas

1 Like

Did you enter the three commands in the black box near the top of the topic linked above? Did something other than upgrading your site happen?

If you did a standard install, then it is the answer to your question. It is the howto that answers it. Those instructions are also in the document that you should have followed to install Discourse.

1 Like

I did the standard installation, but this was nearly 2 yrs ago. I am sure that the upgrade is similar but not identical to the first installation (e.g. not running the config assistant, stopping containers or whatever might be different). I don‘t want lose anything. (Although I did some learning with Docker I am still feeling at noob level for this topic.)

Sorry, I don‘t know what you meant with your question „Did you enter the three commands…“

1 Like

Did you click the link in the first reply that says “How do I manually update Discourse and docker image to latest”? It includes this:

So those are the commands that you use to upgrade. You won’t lose anything.

But if it was two years ago, it’s a bit more complicated because the database needs to get upgraded too, so you’ll want to have a look at PostgreSQL 13 update. (But usually, you just rebuild twice and it works.)

2 Likes

Oops I missed that this is a link. I will work through it and your additional hints - thank you very much so far!!

2 Likes

I wanted to thank @md-misko and @pfaffman for very valuable input.

A couple of text-snippets and some important links saved in my library.

And my problem was solved with the „git pull && launcher rebuild app“ sequence. I forgot how complicated it looks, when watching the build process.

Thomas

3 Likes

Fortunately, you can usually just close your eyes. :wink:

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.