Score:1

How to upgrade mattermost running with docker?

cn flag

I'm hosting mattermost-6.3 via docker. I followed this documentation https://docs.mattermost.com/install/install-docker.html and cloned the repository https://github.com/mattermost/docker then I copied generated the .env file (from env.example) and with docker-compose -f docker-compose.yml -f docker-compose.without-nginx.yml up -d mattermost is up and running.

So far so good, but now I'd like to do an upgrade to v7.4 but I'm finding quite difficult to find a proper documentation on how to do that.

https://docs.mattermost.com/upgrade/prepare-to-upgrade-mattermost.html says what migrations to execute. v6.7, v7.0 and v7.1 are explicitly listed, so that means that I have to first migrate to v6.7, then to v7.0 and then to v7.1? Or can I just apply all the migration at once?

CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_posts_create_at_id on posts(createat, id);
ALTER TABLE reactions ADD COLUMN IF NOT EXISTS channelid varchar(26) NOT NULL DEFAULT '';
UPDATE reactions SET channelid = COALESCE((select channelid from posts where posts.id = reactions.postid), '') WHERE channelid='';
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_reactions_channel_id on reactions (channelid);

And after executing these SQL command in psql, then what? The next item in the documentation is Upgrading mattermost server but there is no mention her for docker installations. So what should I do? Stop everything, change the MATTERMOST_IMAGE_TAG from 6.3 to 7.4 (assuming that the 7.4 tag exists, right now I cannot see that as https://hub.docker.com/r/mattermost/mattermost-enterprise-edition/tags shows a spinning circle only) and then execute docker-compose -f docker-compose.yml -f docker-compose.without-nginx.yml up -d again? Is that all?

Like I said, I fail to find a proper documentation of the necessary steps to upgrade when you run with docker.

And what about plugins? Do I need to do something specific to upgrade those too or are they automatically upgraded when you upgrade mattermost?

Am I missing something?

thed0ctor avatar
pt flag
What I plan on doing is making a backup of everything then spinning up a separate instance from that backup and testing changing the version incrementally to 6.7 then 7.0 then 7.1 using docker-compose pull && docker-compose up -d over and over and cross my fingers and hope it works.
Pablo avatar
cn flag
@thed0ctor I wanted to do same, just make backup, copy everything at home and try there.
Score:0
mv flag

Installing a different version of Mattermost running in Docker:

  • Shut down your deployment.
  • Run git pull to fetch any recent changes to the repository, paying attention to any potential env.example changes.
  • Adjust the MATTERMOST_IMAGE_TAG in the .env file to point your desired enterprise or team image version.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.