2020-06-18 09:34:22 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
|
|
|
CREATE USER hydra WITH ENCRYPTED PASSWORD 'hydra';
|
|
|
|
CREATE DATABASE hydra;
|
|
|
|
GRANT ALL PRIVILEGES ON DATABASE hydra TO hydra;
|
|
|
|
EOSQL
|
|
|
|
|
|
|
|
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
|
|
|
CREATE USER daddy WITH ENCRYPTED PASSWORD 'daddy';
|
|
|
|
CREATE DATABASE daddy;
|
|
|
|
GRANT ALL PRIVILEGES ON DATABASE daddy TO daddy;
|
2020-06-21 14:24:19 +02:00
|
|
|
ALTER DATABASE daddy OWNER TO daddy;
|
2020-06-18 09:34:22 +02:00
|
|
|
EOSQL
|