Harden database startup for Portainer

This commit is contained in:
masterdev
2026-06-16 22:34:07 +01:00
parent 038570646c
commit 6bee04a8e1
5 changed files with 51 additions and 4 deletions

View File

@@ -154,6 +154,12 @@ not need to bind-mount individual files like `database/init.sql` or
`mqtt/mosquitto.conf`. This avoids file-versus-directory mount errors in
Portainer Git stacks.
The backend receives PostgreSQL connection settings as separate variables
(`POSTGRES_HOST`, `POSTGRES_DB`, `POSTGRES_USER`, `POSTGRES_PASSWORD`) and
builds the SQLAlchemy URL internally. This avoids broken database URLs when the
password contains special characters. The backend also retries the database
connection during startup to tolerate Portainer service/DNS startup delays.
### 4. Verify
Open: