update postgresql init db example file (#1689)
This commit is contained in:
parent
2f996450e5
commit
85c57a0b6f
|
@ -13,20 +13,19 @@
|
||||||
#
|
#
|
||||||
# this sh script will auto run when the postgres container starts and the $DATA_PATH_HOST/postgres not found.
|
# 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
|
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||||
# CREATE USER db1 WITH PASSWORD 'db1';
|
# CREATE USER db1 WITH PASSWORD 'db1';
|
||||||
# CREATE DATABASE db1;
|
# CREATE DATABASE db1;
|
||||||
# GRANT ALL PRIVILEGES ON DATABASE db1 TO db1;
|
# GRANT ALL PRIVILEGES ON DATABASE db1 TO db1;
|
||||||
# EOSQL
|
# EOSQL
|
||||||
|
#
|
||||||
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||||
# CREATE USER db2 WITH PASSWORD 'db2';
|
# CREATE USER db2 WITH PASSWORD 'db2';
|
||||||
# CREATE DATABASE db2;
|
# CREATE DATABASE db2;
|
||||||
# GRANT ALL PRIVILEGES ON DATABASE db2 TO db2;
|
# GRANT ALL PRIVILEGES ON DATABASE db2 TO db2;
|
||||||
# EOSQL
|
# EOSQL
|
||||||
|
#
|
||||||
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||||
# CREATE USER db3 WITH PASSWORD 'db3';
|
# CREATE USER db3 WITH PASSWORD 'db3';
|
||||||
# CREATE DATABASE db3;
|
# CREATE DATABASE db3;
|
||||||
|
|
Loading…
Reference in New Issue