Skip to content
Snippets Groups Projects
Commit dde0ff4c authored by Quentin Duchemin's avatar Quentin Duchemin
Browse files

Remove jq call in entrypoint and fix networking

parent b1bdbaba
Branches
No related tags found
No related merge requests found
......@@ -33,6 +33,10 @@ services:
- "traefik.port=8000"
- "traefik.frontend.passHostHeader=true"
- "traefik.enable=true"
networks:
- docker_default
depends_on:
- mattermost-db
restart: unless-stopped
mattermost-db:
......@@ -42,4 +46,6 @@ services:
- mattermost-db:/var/lib/postgresql/data
- /etc/localtime:/etc/localtime:ro
env_file: ./secrets/mattermost-db.secrets
networks:
- docker_default
restart: unless-stopped
......@@ -15,9 +15,7 @@ if [ "$1" = 'mattermost' ]; then
if [[ -z "$MM_SQLSETTINGS_DATASOURCE" && ! -z "$MM_USERNAME" && ! -z "$MM_PASSWORD" ]]
then
echo -ne "Configure database connection..."
# URLEncode the password, allowing for special characters
ENCODED_PASSWORD=$(printf %s $MM_PASSWORD | jq -s -R -r @uri)
export MM_SQLSETTINGS_DATASOURCE="postgres://$MM_USERNAME:$ENCODED_PASSWORD@$DB_HOST:$DB_PORT_NUMBER/$MM_DBNAME?sslmode=disable&connect_timeout=10"
export MM_SQLSETTINGS_DATASOURCE="postgres://$MM_USERNAME:$MM_PASSWORD@$DB_HOST:$DB_PORT_NUMBER/$MM_DBNAME?sslmode=disable&connect_timeout=10"
echo OK
else
echo "Using existing database connection"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment