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

Set container_name field for mattermost and postgres containers #129

Open
HerManNav opened this issue May 31, 2023 · 3 comments
Open

Set container_name field for mattermost and postgres containers #129

HerManNav opened this issue May 31, 2023 · 3 comments

Comments

@HerManNav
Copy link

This is a minor, but:

I think we should consider to set the container_name field for both postgres and mattermost images (in docker-compose.yml), as it is already done in docker-compose.nginx.yml, instead of letting them to be built by the docker-compose command.

I realized about this need since I had 2 different machines for 2 Mattermost servers. The first one had docker v20.10.14. The second one had a minor update v20.10.16, since I set it up a bit later. With the first one I got the following names:

  • mattermost-mattermost-1
  • mattermost-postgres-1

while with the second one I got the same names but concatenated with underscores instead of dashes.

Then I wanted to used the very same mmctl commands for both machines... but needed to change the container name every now and then.

Who knows if docker-compose changes again in the future to follow another naming convention, not only regarding the dashes or underscores. I propose to set those names in the docker-compose.yml to fixed names from now on.

@haivala
Copy link

haivala commented May 31, 2023

Just create docker-compose.override.yml and set the names in there for your instance. They are not defined for a reason.

@HerManNav
Copy link
Author

Ok. But then you should do this every time you update your mattermost instance version after the git pull.

In any case, if that is the intended way to go, I think it should be added to the documentation for newcomers to know at https://docs.mattermost.com/install/install-docker.html

@haivala
Copy link

haivala commented May 31, 2023

git pull does not remove that file as it is not defined in the repo.

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

2 participants