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

Remove jq call in entrypoint and fix networking

parent 2b986d27
No related branches found
No related tags found
1 merge request!44Optimize CI and remove deployment steps, add Mattermost and update Etherpad
Pipeline #52089 passed
......@@ -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.
Finish editing this message first!
Please register or to comment