From 7b5108727aea860844cb473dc3fafdf6cc283198 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 13 Aug 2024 15:12:18 +0200 Subject: [PATCH] fix app db permissions --- files/init-user-db.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/files/init-user-db.sh b/files/init-user-db.sh index aeace2a..a77f42a 100644 --- a/files/init-user-db.sh +++ b/files/init-user-db.sh @@ -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