Mattermost Download Docker ((EXCLUSIVE))

0 views
Skip to first unread message

Sebrina Lobianco

unread,
Jan 18, 2024, 9:00:41 AM1/18/24
to headoctase

Just had the same problem on the docker variant. There might be some errors in the documentation, made at PR. Gist is that the documentation seems to be missing the mattermost['enable'] = true setting that must be set.

mattermost download docker


Downloadhttps://t.co/nyIMJZRTB2



Sorry for this wall of text, but it all depends a bit on what your current setup looks like, the details not mentioned so far and if you want to go all-in on the docker approach or leave parts outside of it.

Environment variables always overrule values in the config.json and at the bottom of your .env file, you will see some of them (like MM_SERVICESETTINGS_SITEURL, MM_SQLSETTINGS_DRIVERNAME, etc.).
You either need to make sure that they contain the correct values, or you remove them from the environment: section in your docker-compose.yml.

FWIW though, I can use a SQL client (Sequeler) to connect to the DB running in docker on port 3333 from my laptop, and I was also able to do so before changing the config. I cannot however connect to the DB running on 3306 (it times out).

I'm hosting mattermost-6.3 via docker. I followed this documentation -docker.html and cloned the repository 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.

-to-upgrade-mattermost.html says whatmigrations to execute. v6.7, v7.0 and v7.1 are explicitly listed, so thatmeans 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?

And after executing these SQL command in psql, then what? The next item in thedocumentation is Upgrading mattermost server butthere is no mention her for docker installations. So what should I do? Stopeverything, change the MATTERMOST_IMAGE_TAG from 6.3 to 7.4 (assuming thatthe 7.4 tag exists, right now I cannot see that as -enterprise-edition/tagsshows 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?

mattermost/mattermost-enterprise-edition - Official Mattermost Server image for the Enterprise Edition version. To find the Dockerfile please refer to the GitHub repo.

mattermost/mattermost-cloud - Mattermost Private Cloud is a SaaS offering meant to smooth and accelerate the customer journey from trial to full adoption. For more information please refer to the GitHub repo.

mattermost/platform - Mirror of mattermost/mattermost-preview. This is a Docker image to install Mattermost in Preview Mode for exploring product functionality on a single machine using Docker. Preview image (mirror). Documentation. GitHub repo.

mattermost/mattermost-prod-app - Community driven image for Mattermost Server. This Docker repository will be deprecated in Mattermost 6.0. For more information and to check the Dockerfile please refer to the GitHub repo.

mattermost/mattermost-prod-db - Community driven image for Database to run together with mattermost/mattermost-prod-app. This Docker repository will be deprecated in Mattermost 6.0. For more information and to check the Dockerfile please refer to the GitHub repo.

mattermost/mattermost-prod-web - Community driven image for WebServer to run together with mattermost/mattermost-prod-app. This Docker repository will be deprecated in Mattermost 6.0. For more information and to check the Dockerfile please refer to the GitHub repo.

mattermost/mattermost-test-enterprise - Repository where all testing images are published and available for any type of testing. These images are built from the CircleCI Pipelines from the mattermost-server and mattermost-webapp.

mattermost/mattermost-test-team - Repository where all testing images are published and available for any type of testing. These images are built from the CircleCI Pipelines from the mattermost-server and mattermost-webapp.

So far, the Mattermost instance is only available locally on your Docker host (we specifically requested it to with "127.0.0.1:8066:8065" in the ports section of the docker-compose.yml). But we have mattermost.my_domain.com waiting for us, so let's reverse proxy it !

Your container is restarting and this usually indicates problems with the configuration.
Can you share the output of docker logs dd3db8105cd1 (or whatever the container ID is for the mattermost container then)?

Did it,
Actually, this is where is goes pearshape
matterm-mattermost-1 Error: failed to load configuration: could not create config file: open /mattermost/config/config.json: permission denied

You do not need to use sudo for the commands, in fact, it will not help you at all because when you use sudo, the current working directory will change and the container will not find your .env file or the volumes folder, so please do not use sudo with the docker-compose commands.

No access to volumes is solved: see config.json cannot be created: permission denied Issue #106 mattermost/docker GitHub
In short: rootless docker containers map the uids within the host user namespace.

Anyways, if yours is crashing after a reboot, can you please provide some more details? Are we talking about a system reboot here (as in you reboot the box which holds the containers) or are we talking about a restart of the docker containers? Can you provide the logs for when this happens? volumes/app/mattermost/logs/mattermost.log and/or the output of docker logs would help.

As you can see from the attached image the command runs just fine on that exact docker install you mentioned. (disregard the 2> /dev/null that is only used to surpress the log messages during the import for this screenshot)

PS: To install Mattermost on a Raspberry Pi 4, the most straightforward, docker-avoiding pathway is probably to use Arch Linux, or an Arch-derivative, like Manjaro. There is a Mattermost AUR package, where a refreshingly old-school, docker-avoiding, alternative-to-AMD64-arch-friendly Makefile has been written, and is maintained. See here, for more details.

ad 1)
Make sure you read the Important Upgrade Notes, this is basically the only relevant documentation for such a big upgrade. Looking at the page, you will see that starting with 5.22.0 there are quite some big schema changes introduced to the databases and depending on your deployment model, these will take some time to finish, so prepare for a longer downtime during an upgrade.
If you use systemd for starting mattermost, you could run into a timeout while starting due to the long running migrations, so it would be a good idea to not use systemd for such big upgrades but start the server manually for the first time; this also helps with watching the logs directly being printed to the console so you can see what happens in case of errors, but if you upgrade in multiple steps, this should not be necessary.

If your mattermost instance is running on a virtual machine, you could also shut it down before you start with the upgrades and take a snapshot of the virtual machine, this will help you to immediately and quickly revert to the state before the updates.

Okay, I tried and failed once. Luckily, the virtual machine snapshot got restored. I also discovered that my mattermost version is 6.3.7, not 5.1.1. The latter was the version number for the Mattermost Apple Store app!

Well, if you use mattermost/docker instead of mattermost-docker, then you do not have to go through the hassle at all. You can just change the releaes tag in your .env file and upon a restart, your new mattermost version will be up and running.

I installed MM via docker-compose (Ubuntu 20.04), and it was working fine via url, and locally via localhost:8065, that is until I decided to reboot my proxy server (apache) and reboot the docker container. Now, whenever I start the docker container, I cannot longer access my mattermost. When testing for the port using telnet, it looks like it gets connected but then the connection is closed.

To access the Mattermost management panel, go to from your workstation, where mattermost.heyvaldemar.net is the domain name of my service. Accordingly, you need to specify your domain name that points to the IP address of your server with the installed Traefik service, which will redirect the request to Mattermost.

To access the Traefik control panel, go to from your workstation, where traefik.mattermost.heyvaldemar.net is the domain name of my service. Accordingly, you need to specify your domain name that points to the IP address of your server with the installed Traefik.

You can not install iptables inside a docker container, since it does not have access to the iptables anyways.
All connections from a docker container are visible on the host on the outside, so you should use these tools on your linux host and not inside the container.

To do that, you can install the busybox-static package on your host system (or compile your own statically linked busybox binary with all the tools you need) and map it into the container by modifying the volumes in your docker-compose.yml file (see last line of the volumes section)

inside the directory where you did install the mattermost do a docker-compose pull to pull the latest mattermost docker image.
Then do
sudo docker-compose -f docker-compose.yml -f docker-compose.without-nginx.yml down && sudo docker-compose -f docker-compose.yml -f docker-compose.without-nginx.yml up -d
That should upgrade you to version 7.7.1

Since the folder contains multiple yml files, do we need to specify the two ymls we are using when running a docker pull? like this:
sudo docker-compose -f docker-compose.yml -f docker-compose.without-nginx.yml pull

df19127ead
Reply all
Reply to author
Forward
0 new messages