some minot updates and fixes

This commit is contained in:
Marco Kundt 2021-05-04 14:15:37 +02:00
parent 6a84350961
commit 36c7c04f54
3 changed files with 13 additions and 7 deletions

View File

@ -18,13 +18,13 @@ $ git pull https://github.com/mattermost/docker
$ cd docker $ cd docker
``` ```
### 2. Create a *.env* file by copying and adjusting the example file ### 2. Create a *.env* file by copying and adjusting the env.example file
Docker will search for an *.env* file when no option specifies another environment file. Afterwards edit it with your preferred text editor.
``` ```
$ cp env.example .env $ cp env.example .env
``` ```
### 3. Create the needed directores and set permissions (this orientates on the previous *mattermost-docker* structure and the ### 3. Create the needed directores and set permissions (this orientates on the previous *mattermost-docker* structure and the direcories can be changed in the *.env* file)
direcories can be changed in the *.env* file)
``` ```
$ mkdir -p ./volumes/app/mattermost/{config,data,logs,plugins,client-plugins} $ mkdir -p ./volumes/app/mattermost/{config,data,logs,plugins,client-plugins}
@ -46,16 +46,22 @@ $ cp PATH-TO-KEY.PEM ./volumes/web/cert/key-no-password.pem
For using Let's Encrypt you can follow this guide LINK or use the this Bash script scripts/issue-certificate.sh. Both For using Let's Encrypt you can follow this guide LINK or use the this Bash script scripts/issue-certificate.sh. Both
methods requires you to change the path to the Let's Encrypt config folders inside the *.env*. methods requires you to change the path to the Let's Encrypt config folders inside the *.env*.
``` ```
$ sudo docker volume create shared-webroot
$ bash scripts/issue-certificate.sh -d mm.example.com -o ./certs $ bash scripts/issue-certificate.sh -d mm.example.com -o ./certs
``` ```
### 5. Run `docker-compose` ### 5. Run `docker-compose`
First ensure the docker daemon is enabled and running:
```
$ sudo systemctl enable --now docker
```
#### 5.1 Default (with nginx) #### 5.1 Default (with nginx)
``` ```
$ sudo docker-compose -f docker-compose.yml -f docker-compose.nginx.yml up -d $ sudo /usr/local/bin/docker-compose -f docker-compose.yml -f docker-compose.nginx.yml up -d
``` ```
#### 5.2. Without nginx (for use behind an existing reverse proxy) #### 5.2. Without nginx (for use behind an existing reverse proxy)
``` ```
$ sudo docker-compose -f docker-compose.yml -f docker-compose.without-nginx.yml up -d $ sudo /usr/local/bin/docker-compose -f docker-compose.yml -f docker-compose.without-nginx.yml up -d
``` ```

View File

@ -54,7 +54,7 @@ MATTERMOST_PLUGINS_PATH=./volumes/app/mattermost/plugins
MATTERMOST_CLIENT_PLUGINS_PATH=./volumes/app/mattermost/client-plugins MATTERMOST_CLIENT_PLUGINS_PATH=./volumes/app/mattermost/client-plugins
MATTERMOST_IMAGE=mattermost-enterprise-edition MATTERMOST_IMAGE=mattermost-enterprise-edition
MATTERMOST_IMAGE_TAG=release-5.34 MATTERMOST_IMAGE_TAG=5.34
## The app port is only relevant for using Mattermost without the nginx container as reverse proxy. This is not meant ## The app port is only relevant for using Mattermost without the nginx container as reverse proxy. This is not meant
## to be used with the internal HTTP server exposed but rather in case one wants to host several services on one host ## to be used with the internal HTTP server exposed but rather in case one wants to host several services on one host

View File

@ -27,7 +27,7 @@ webroot_path = /usr/share/nginx/html,
EOF EOF
} }
# become root by asking for sudo password # become root (keeping environment) and make script executable
if [ $EUID != 0 ]; then if [ $EUID != 0 ]; then
chmod +x "$0" chmod +x "$0"
sudo -E ./"$0" "$@" sudo -E ./"$0" "$@"