digitalboard.core/roles/nextcloud/templates/init-db.sql.j2
Bert-Jan Fikse 6ab3505dc8
feat: add basic nextcloud role
nextcloud with optional collabora base setup
2025-12-19 14:17:08 +01:00

10 lines
No EOL
490 B
Django/Jinja

-- Grant necessary permissions to the Nextcloud PostgreSQL user
-- CREATEROLE allows creating roles for Nextcloud apps
ALTER USER {{ nextcloud_postgres_user }} WITH CREATEROLE;
-- Pre-create the Nextcloud database to prevent automatic user creation
CREATE DATABASE {{ nextcloud_postgres_db }} OWNER {{ nextcloud_postgres_user }};
-- Grant CREATE permission on public schema in the new database
\c {{ nextcloud_postgres_db }}
GRANT CREATE ON SCHEMA public TO {{ nextcloud_postgres_user }};