Verified Commit 13cb8f32 authored by Quentin Duchemin's avatar Quentin Duchemin
Browse files

Add default SiteURL so that the app bootstraps without manual setting

parent 548063a1
Pipeline #52108 passed with stages
in 3 minutes and 55 seconds
......@@ -27,6 +27,7 @@ services:
- /etc/localtime:/etc/localtime:ro
environment:
- DB_HOST=mattermost-db
- MM_SITEURL=team.picasoft.net
env_file: ./secrets/mattermost-db.secrets
labels:
- "traefik.frontend.rule=Host:team.picasoft.net"
......
......@@ -10,6 +10,7 @@ DB_HOST=${DB_HOST:-db}
DB_PORT_NUMBER=${DB_PORT_NUMBER:-5432}
MM_DBNAME=${MM_DBNAME:-mattermost}
MM_CONFIG=${MM_CONFIG:-/mattermost/config/config.json}
MM_SITEURL=${MM_SITEURL:-team.picasoft.net}
if [ "${1:0:1}" = '-' ]; then
set -- mattermost "$@"
......@@ -33,6 +34,7 @@ if [ "$1" = 'mattermost' ]; then
# Copy default configuration file
cp /config.json.save $MM_CONFIG
# Substitue some parameters with jq
jq '.ServiceSettings.SiteURL = "'${MM_SITEURL}'"' $MM_CONFIG > $MM_CONFIG.tmp && mv $MM_CONFIG.tmp $MM_CONFIG
jq '.ServiceSettings.ListenAddress = ":8000"' $MM_CONFIG > $MM_CONFIG.tmp && mv $MM_CONFIG.tmp $MM_CONFIG
jq '.LogSettings.EnableConsole = true' $MM_CONFIG > $MM_CONFIG.tmp && mv $MM_CONFIG.tmp $MM_CONFIG
jq '.LogSettings.ConsoleLevel = "ERROR"' $MM_CONFIG > $MM_CONFIG.tmp && mv $MM_CONFIG.tmp $MM_CONFIG
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment