docs(postgres): avoid using the admin user. (#4975)

docs: Update the documentation to avoid using the postgres user.

In some environments it is not possible to get access to the postgres
user.

Co-authored-by: Silvan <silvan.reusser@gmail.com>
This commit is contained in:
Gibheer 2023-01-05 11:05:01 +01:00 committed by GitHub
parent ec7f658264
commit f34611d675
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,3 +36,21 @@ Database:
Cert:
Key:
```
The admin user is only needed for the installation step but can also be avoided
by preparing the necessary requirements:
* the zitadel user
* the zitadel database
* granting required permissions to the zitadel user
```sql
CREATE ROLE zitadel LOGIN;
CREATE DATABASE zitadel;
GRANT CONNECT, CREATE ON DATABASE zitadel TO zitadel;
```
Don't forget to adjust pg_hba.conf and set a password for the zitadel user.
With the setup done, follow the [phases guide](/docs/self-hosting/manage/updating_scaling#separating-init-and-setup-from-the-runtime)
to run the init and then setup phase to get all necessary tables and data set up.