Sfoglia il codice sorgente

fix for psql command on extending the script

Sushil Shrestha 7 anni fa
parent
commit
f0b880775d
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      postgres/content.md

+ 1 - 1
postgres/content.md

@@ -142,7 +142,7 @@ For example, to add an additional user and database, add the following to `/dock
 #!/bin/bash
 #!/bin/bash
 set -e
 set -e
 
 
-psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" <<-EOSQL
+psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
 	CREATE USER docker;
 	CREATE USER docker;
 	CREATE DATABASE docker;
 	CREATE DATABASE docker;
 	GRANT ALL PRIVILEGES ON DATABASE docker TO docker;
 	GRANT ALL PRIVILEGES ON DATABASE docker TO docker;