~jan0sch/smederee

Showing details for patch 549eedbced045c64c120144d2798baa246c43d64.
2023-03-01 (Wed), 8:22 PM - Jens Grassel - 549eedbced045c64c120144d2798baa246c43d64

Update README with some notes for deployment and databases.

Summary of changes
1 files modified with 20 lines added and 3 lines removed
  • README.md with 20 added and 3 removed lines
diff -rN -u old-smederee/README.md new-smederee/README.md
--- old-smederee/README.md	2025-01-31 13:54:47.022084437 +0000
+++ new-smederee/README.md	2025-01-31 13:54:47.022084437 +0000
@@ -83,9 +83,28 @@
 Please ensure that the system requirements are met and that you have the
 credentials needed to access the database.
 
+### Database setup ###
+
+The application uses schemas which may reside in a single database or not
+but it is important that the configured database users have all necessary
+permissions on that schemas. This can be achieved in a multitude of ways:
+
+1. The schema is created beforehand by the administrator with the correct
+   owner, for example: `CREATE SCHEMA "hub" AUTHORIZATION smederee_hub;`
+2. The database is owned by the user and the schema will be created on the
+   first application start automatically.
+
+Please note that different users (modules) sharing the same database (which
+is possible due to the schema separation) need `CONNECT` and `CREATE`
+permissions on the database.
+
+```sql
+GRANT CONNECT, CREATE ON DATABASE <database name> TO <role name>;
+```
+
 TODO
 
-### Coloured diffs
+### Coloured diffs ###
 
 1. Install `colordiff`
 2. Configure the `$SMEDEREE_USER/.darcs/defaults` file to contain the following line:
@@ -93,8 +112,6 @@
    diff diff-command colordiff -rN -u %1 %2
    ```
 
-## Links ##
-
 [1]: https://owasp.org/Top10/
 [2]: https://cheatsheetseries.owasp.org/cheatsheets/Session_Management_Cheat_Sheet.html
 [3]: https://cheatsheetseries.owasp.org/cheatsheets/JSON_Web_Token_for_Java_Cheat_Sheet.html