forked from coop-cloud/mattermost
Working on secrets
This commit is contained in:
parent
d0d3b91aaa
commit
8bc564c4b3
|
@ -6,9 +6,10 @@ if test -f "/run/secrets/postgres_password"; then
|
||||||
echo >&2 "error: /run/secrets/postgres_password is empty"
|
echo >&2 "error: /run/secrets/postgres_password is empty"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "abra-mattermost-entrypoint.sh setting POSTGRES_PASSWORD"
|
echo "abra-mattermost-entrypoint.sh setting POSTGRES_PASSWORD ${pwd}"
|
||||||
export "POSTGRES_PASSWORD"="$pwd"
|
export "POSTGRES_PASSWORD"="$pwd"
|
||||||
export "MM_SQLSETTINGS_DATASOURCE"="postgres://mattermost:${pwd}@postgres:5432/mattermost?sslmode=disable&connect_timeout=10"
|
export "MM_SQLSETTINGS_DATASOURCE"="postgres://mattermost:${pwd}@postgres:5432/mattermost?sslmode=disable&connect_timeout=10"
|
||||||
|
echo "CONNECTION_STRING: ${MM_SQLSETTINGS_DATASOURCE}"
|
||||||
unset "pwd"
|
unset "pwd"
|
||||||
else
|
else
|
||||||
echo >&2 "error: /run/secrets/postgres_password does not exist"
|
echo >&2 "error: /run/secrets/postgres_password does not exist"
|
||||||
|
|
|
@ -17,7 +17,7 @@ services:
|
||||||
|
|
||||||
# necessary Postgres options/variables
|
# necessary Postgres options/variables
|
||||||
- POSTGRES_USER=mattermost
|
- POSTGRES_USER=mattermost
|
||||||
- POSTGRES_PASSWORD=/run/secrets/postgres_password
|
- POSTGRES_PASSWORD=mysupersecretpassword
|
||||||
- POSTGRES_DB=mattermost
|
- POSTGRES_DB=mattermost
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
|
|
Loading…
Reference in New Issue