0.1.0 rc, still testing that one
This commit is contained in:
19
entrypoint.sh
Normal file
19
entrypoint.sh
Normal file
@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
if test -f "/run/secrets/postgres_password"; then
|
||||
pwd=`cat /run/secrets/postgres_password`
|
||||
if [ -z $pwd ]; then
|
||||
echo >&2 "error: /run/secrets/postgres_password is empty"
|
||||
exit 1
|
||||
fi
|
||||
echo "abra-mattermost-entrypoint.sh setting POSTGRES_PASSWORD and MM_SQLSETTINGS_DATASOURCE"
|
||||
export "POSTGRES_PASSWORD"="$pwd"
|
||||
export "MM_SQLSETTINGS_DATASOURCE"="postgres://mattermost:${pwd}@postgres:5432/mattermost?sslmode=disable&connect_timeout=10"
|
||||
unset "pwd"
|
||||
else
|
||||
echo >&2 "error: /run/secrets/postgres_password does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# https://github.com/mattermost/mattermost-server/blob/master/build/Dockerfile
|
||||
/entrypoint.sh "mattermost"
|
||||
Reference in New Issue
Block a user