Merge pull request #2370 from jcs224/postgres-confuence-init-fix

Fix confluence / postgres init
This commit is contained in:
Shao Yu-Lung (Allen) 2019-12-05 10:35:27 +08:00 committed by GitHub
commit e53632404f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,7 +33,7 @@
# EOSQL
#
### default database and user for confluence ##############################################
if [ "$POSTGRES_CONFLUENCE_INIT" == 'true' ]; then
if [ "$CONFLUENCE_POSTGRES_INIT" == 'true' ]; then
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
CREATE USER $POSTGRES_CONFLUENCE_USER WITH PASSWORD '$POSTGRES_CONFLUENCE_PASSWORD';
CREATE DATABASE $POSTGRES_CONFLUENCE_DB;
@ -41,4 +41,4 @@ if [ "$POSTGRES_CONFLUENCE_INIT" == 'true' ]; then
ALTER ROLE $POSTGRES_CONFLUENCE_USER CREATEROLE SUPERUSER;
EOSQL
echo
fi
fi