fix wrong sql
This commit is contained in:
parent
75b3fa499e
commit
6caa4c5fb9
|
@ -6,9 +6,9 @@
|
||||||
# example: .env POSTGRES_USER=appuser and need db name is myshop_db
|
# example: .env POSTGRES_USER=appuser and need db name is myshop_db
|
||||||
#
|
#
|
||||||
# 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 my_user PASSWORD my_password;
|
# CREATE USER myuser IDENTIFIED BY ENCRYPTED PASSWORD 'mypassword';
|
||||||
# CREATE DATABASE myshop_db;
|
# CREATE DATABASE myshop_db;
|
||||||
# GRANT ALL PRIVILEGES ON DATABASE myshop_db TO my_user;
|
# GRANT ALL PRIVILEGES ON DATABASE myshop_db TO myuser;
|
||||||
# EOSQL
|
# EOSQL
|
||||||
#
|
#
|
||||||
# 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.
|
||||||
|
@ -16,19 +16,19 @@
|
||||||
|
|
||||||
set -e
|
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 PASSWORD db1;
|
# CREATE USER db1 IDENTIFIED BY ENCRYPTED 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 PASSWORD db2;
|
# CREATE USER db2 IDENTIFIED BY ENCRYPTED 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 PASSWORD db3;
|
# CREATE USER db3 IDENTIFIED BY ENCRYPTED PASSWORD 'db3';
|
||||||
# CREATE DATABASE db3;
|
# CREATE DATABASE db3;
|
||||||
# GRANT ALL PRIVILEGES ON DATABASE db3 TO db3;
|
# GRANT ALL PRIVILEGES ON DATABASE db3 TO db3;
|
||||||
# EOSQL
|
# EOSQL
|
||||||
|
|
Loading…
Reference in New Issue