secret() value keeps on changing on UI reload.

I have a nodejs project that connects to a postgres container. I use ${{secret()}}to randomly generate a postgres user password. Which works fine for postgres. Lets say app fails and I refresh the UI and click redeploy my nodejs app. The UI reload re-generates a new secret value but the postgres was deployed with old secret. So I get invalid password related errors in my app.
Solution:
${{secret ()}} can not be used after you have deployed a service, they are only to be set in templates, not on already deployed services
Jump to solution
3 Replies
Percy
Percy6mo ago
Project ID: N/A
DSdatsme
DSdatsmeOP6mo ago
N/A
Solution
Brody
Brody6mo ago
${{secret ()}} can not be used after you have deployed a service, they are only to be set in templates, not on already deployed services
Want results from more Discord servers?
Add your server