mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-06-03 17:30:09 +00:00
9
Containers/postgresql/init-user-db.sh
Normal file
9
Containers/postgresql/init-user-db.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
set -ex
|
||||
|
||||
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||
CREATE USER "oc_$POSTGRES_USER" WITH PASSWORD "$POSTGRES_PASSWORD";
|
||||
GRANT ALL PRIVILEGES ON DATABASE "$POSTGRES_DB" TO "oc_$POSTGRES_USER";
|
||||
EOSQL
|
||||
|
||||
set +ex
|
||||
Reference in New Issue
Block a user