docs: update Postgres password generation to use a 24-character random string

This commit is contained in:
kastov
2025-05-12 19:22:24 +03:00
parent c749a41e7b
commit 92bbabb6ed

View File

@@ -40,7 +40,7 @@ sed -i "s/^METRICS_PASS=.*/METRICS_PASS=$(openssl rand -hex 64)/" .env && sed -i
Also, it is better to change the default Postgres password.
```bash title="Changing Postgres password"
pw=$(openssl rand -hex 64) && sed -i "s/^POSTGRES_PASSWORD=.*/POSTGRES_PASSWORD=$pw/" .env && sed -i "s|^\(DATABASE_URL=\"postgresql://postgres:\)[^\@]*\(@.*\)|\1$pw\2|" .env
pw=$(openssl rand -hex 24) && sed -i "s/^POSTGRES_PASSWORD=.*/POSTGRES_PASSWORD=$pw/" .env && sed -i "s|^\(DATABASE_URL=\"postgresql://postgres:\)[^\@]*\(@.*\)|\1$pw\2|" .env
```
Now, open the `.env` file, you need to change the following variables: