fix app db permissions

This commit is contained in:
Robert Kaussow 2024-08-13 15:12:18 +02:00
parent cfe9e0373d
commit 7b5108727a
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0

View File

@ -7,5 +7,6 @@ if [ -n "$POSTGRES_APP_USER" ] && [ -n "$POSTGRES_APP_PASSWORD" ] && [ -n "$POST
CREATE USER $POSTGRES_APP_USER WITH ENCRYPTED PASSWORD '${POSTGRES_APP_PASSWORD}';
CREATE DATABASE $POSTGRES_APP_DB;
GRANT ALL PRIVILEGES ON DATABASE $POSTGRES_APP_DB TO $POSTGRES_APP_USER;
ALTER DATABASE $POSTGRES_APP_DB OWNER TO $POSTGRES_APP_USER;
EOSQL
fi