Mattermost docker image with nginx proxy dont work
Expected behavior
i install mattermost with docker-compose with this config =
version: “2”
services:
db:
build: db
restart: unless-stopped
volumes:
- ./volumes/db/var/lib/postgresql/data:/var/lib/postgresql/data
- /etc/localtime:/etc/localtime:ro
environment:
- POSTGRES_USER=user
- POSTGRES_PASSWORD=pw
- POSTGRES_DB=mattermost
# uncomment the following to enable backup
# - AWS_ACCESS_KEY_ID=XXXX
# - AWS_SECRET_ACCESS_KEY=XXXX
# - WALE_S3_PREFIX=s3://BUCKET_NAME/PATH
# - AWS_REGION=us-east-1
app:
build:
context: app
# comment out 2 following lines for team edition
# args:
# - edition=team
restart: unless-stopped
volumes:
- ./volumes/app/mattermost/config:/mattermost/config:rw
- ./volumes/app/mattermost/data:/mattermost/data:rw
- ./volumes/app/mattermost/logs:/mattermost/logs:rw
- /etc/localtime:/etc/localtime:ro
environment:
# set same as db credentials and dbname
- MM_USERNAME=user
- MM_PASSWORD=pw
- MM_DBNAME=mattermost
# in case your config is not in default location #- MM_CONFIG=/mattermost/config/config.json
ports:
- “8000:443”
links:
- db:db
i see the link and i read the link, but is the doc real or outdatet.
i read thats mattermost 5… the port is now 8000 and not 8065. The docker app container say also 8000. So now i ám confused.
Also when i expose ports in the config file, always is come thats blocked not ended.
To my understand.
Port is 8065?
I bind my nginx proxy to 127.0.0.1:8065?
sry too much frustration and i think it is my fault
that expose was from one test. I set it now again from scratch but also , ist has always error 500.
i post you my settings:
ubuntu , nginx, docker
docker-compose.xml
version: “2”
services:
db:
build: db
read_only: true
restart: unless-stopped
volumes:
- ./volumes/db/var/lib/postgresql/data:/var/lib/postgresql/data
- /etc/localtime:/etc/localtime:ro
environment:
- POSTGRES_USER=mmuser
- POSTGRES_PASSWORD=mmuser_password
- POSTGRES_DB=mattermost
# uncomment the following to enable backup
# - AWS_ACCESS_KEY_ID=XXXX
# - AWS_SECRET_ACCESS_KEY=XXXX
# - WALE_S3_PREFIX=s3://BUCKET_NAME/PATH
# - AWS_REGION=us-east-1
app:
build:
context: app
# uncomment following lines for team edition or change UID/GID
# args:
# - edition=team
# - PUID=1000
# - PGID=1000
restart: unless-stopped
volumes:
- ./volumes/app/mattermost/config:/mattermost/config:rw
- ./volumes/app/mattermost/data:/mattermost/data:rw
- ./volumes/app/mattermost/logs:/mattermost/logs:rw
- ./volumes/app/mattermost/plugins:/mattermost/plugins:rw
- ./volumes/app/mattermost/client-plugins:/mattermost/client/plugins:rw
- /etc/localtime:/etc/localtime:ro
environment:
# set same as db credentials and dbname
- MM_USERNAME=mmuser
- MM_PASSWORD=mmuser_password
- MM_DBNAME=mattermost
# in case your config is not in default location #- MM_CONFIG=/mattermost/config/config.json
Thanks, it works now when i bind the nginx proxy to the docker ip from the mattermost app with port 8000.
But i have one question, when i uncomment the arg line with the edition or i wrote the port line, docker-compose write a failure:
ERROR: yaml.parser.ParserError: while parsing a block mapping
in “./docker-compose.yml”, line 24, column 7
expected , but found ‘’
in “./docker-compose.yml”, line 26, column 8
db:
build: db
read_only: true
restart: unless-stopped
volumes:
- ./volumes/db/var/lib/postgresql/data:/var/lib/postgresql/data
- /etc/localtime:/etc/localtime:ro
environment:
- POSTGRES_USER=xxx
- POSTGRES_PASSWORD=xxx
- POSTGRES_DB=xxx
# uncomment the following to enable backup
# - AWS_ACCESS_KEY_ID=XXXX
# - AWS_SECRET_ACCESS_KEY=XXXX
# - WALE_S3_PREFIX=s3://BUCKET_NAME/PATH
# - AWS_REGION=us-east-1
app:
build:
context: app
# uncomment following lines for team edition or change UID/GID
args:
- edition=team
# - PUID=1000
# - PGID=1000
restart: unless-stopped
volumes:
- ./volumes/app/mattermost/config:/mattermost/config:rw
- ./volumes/app/mattermost/data:/mattermost/data:rw
- ./volumes/app/mattermost/logs:/mattermost/logs:rw
- ./volumes/app/mattermost/plugins:/mattermost/plugins:rw
- ./volumes/app/mattermost/client-plugins:/mattermost/client/plugins:rw
- /etc/localtime:/etc/localtime:ro
environment:
# set same as db credentials and dbname
- MM_USERNAME=xxx
- MM_PASSWORD=xxx
- MM_DBNAME=xxx
ports:
- “8000:8000”
# in case your config is not in default location #- MM_CONFIG=/mattermost/config/config.json
I become the same issues by the edition and the port parameter: