Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to upgrade mattermost running with docker #109

Open
shaoran opened this issue Oct 25, 2022 · 3 comments
Open

How to upgrade mattermost running with docker #109

shaoran opened this issue Oct 25, 2022 · 3 comments

Comments

@shaoran
Copy link

shaoran commented Oct 25, 2022

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 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 here for docker installations. So what should I do next?

  • Stop everyting
  • git pull
  • look at the differences between the .env file and env.example and apply them to .env
  • change the MATTERMOST_IMAGE_TAG from 6.3 to 7.4
  • execute docker-compose -f docker-compose.yml -f docker-compose.without-nginx.yml up -d

Is that all? Or are there other things to be considered like the postgres version? 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?

@FarhanShares
Copy link

I'm also a bit confused right now. I've mm 7.1 EE installed via docker compose. There's a guide (https://github.com/mattermost/docker/blob/main/scripts/UPGRADE.md) but it's not super clear to me. Specially the list of env vars are confusing me a lot.

@VA2XJM
Copy link
Contributor

VA2XJM commented Nov 27, 2022

Edit .env and change the version number to version wished. Once done, save.

Then:

docker-compose pull
docker-compose down
docker-compose -f docker-compose.without-nginx.yml -f docker-compose.yml up -d

@getsueineko
Copy link

getsueineko commented Jul 15, 2023

Edit .env and change the version number to version wished. Once done, save.

Then:

docker-compose pull
docker-compose down
docker-compose -f docker-compose.without-nginx.yml -f docker-compose.yml up -d

What about upgrade to 8.0 version? I did everything that is described above, however, at startup, they write to me that I have the wrong version of the mattemost-server, and after starting there is no version in the about option.

Update: I'm not alone mattermost/mattermost#24034

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants