Verified Commit c25ae68f authored by Quentin Duchemin's avatar Quentin Duchemin
Browse files

Remove jq call in entrypoint and fix networking

parent 2b986d27
Pipeline #52089 passed with stages
in 3 minutes and 46 seconds
......@@ -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"
......
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