mirror of
https://github.com/atareao/self-hosted.git
synced 2024-07-01 19:45:39 +02:00
53 lines
1.5 KiB
YAML
Executable File
53 lines
1.5 KiB
YAML
Executable File
version: "3"
|
|
|
|
services:
|
|
|
|
db:
|
|
build: db
|
|
read_only: true
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./pg/data:/var/lib/postgresql/data
|
|
- /etc/localtime:/etc/localtime:ro
|
|
environment:
|
|
- POSTGRES_USER=${PG_USER}
|
|
- POSTGRES_PASSWORD=${PG_PASSWORD}
|
|
- POSTGRES_DB=${PG_DB}
|
|
networks:
|
|
- internal
|
|
|
|
mattermost:
|
|
build:
|
|
context: mattermost
|
|
# uncomment following lines for team edition or change UID/GID
|
|
args:
|
|
- edition=team
|
|
# - PUID=1000
|
|
# - PGID=1000
|
|
# - MM_VERSION=5.31
|
|
restart: unless-stopped
|
|
networks:
|
|
- internal
|
|
volumes:
|
|
- ./mm/config:/mattermost/config:rw
|
|
- ./mm/data:/mattermost/data:rw
|
|
- ./mm/logs:/mattermost/logs:rw
|
|
- ./mm/plugins:/mattermost/plugins:rw
|
|
- ./mm/client-plugins:/mattermost/client/plugins:rw
|
|
- /etc/localtime:/etc/localtime:ro
|
|
environment:
|
|
# set same as db credentials and dbname
|
|
- MM_USERNAME=${PG_USER}
|
|
- MM_PASSWORD=${PG_PASSWORD}
|
|
- MM_DBNAME=${PG_DB}
|
|
|
|
# use the credentials you've set above, in the format:
|
|
# MM_SQLSETTINGS_DATASOURCE=postgres://${MM_USERNAME}:${MM_PASSWORD}@db:5432/${MM_DBNAME}?sslmode=disable&connect_timeout=10
|
|
- MM_SQLSETTINGS_DATASOURCE=postgres://${PG_USER}:${PG_PASSWORD}@db:5432/${PG_DB}?sslmode=disable&connect_timeout=10
|
|
|
|
# in case your config is not in default location
|
|
#- MM_CONFIG=/mattermost/config/config.json
|
|
|
|
networks:
|
|
internal:
|