update postgresql init db example file (#1689)

This commit is contained in:
ahkui 2018-07-06 20:59:57 +08:00 committed by Shao Yu-Lung (Allen)
parent 2f996450e5
commit 85c57a0b6f
1 changed files with 3 additions and 4 deletions

View File

@ -13,20 +13,19 @@
#
# this sh script will auto run when the postgres container starts and the $DATA_PATH_HOST/postgres not found.
#
set -e
#
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
# CREATE USER db1 WITH PASSWORD 'db1';
# CREATE DATABASE db1;
# GRANT ALL PRIVILEGES ON DATABASE db1 TO db1;
# EOSQL
#
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
# CREATE USER db2 WITH PASSWORD 'db2';
# CREATE DATABASE db2;
# GRANT ALL PRIVILEGES ON DATABASE db2 TO db2;
# EOSQL
#
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
# CREATE USER db3 WITH PASSWORD 'db3';
# CREATE DATABASE db3;