App Platform does not have access to managed database during build phase

So I have created a managed PostgreSQL database, attached it to the App, added App as the trusted source, but scripts that I run during the build phase cannot connect to the database. How can I solve this problem besides allowing all connections to the database?

Show comments

Submit an answer
Answer a question...

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I’ve been struggling with this and finally came to your conclusion. How should I migrate my DB at code push before it is fully deployed?

They have to fix this.

Oh and @Bobbyiliev My ENV is correct but the DBaaS firewall forbids my access (by Timeout).

Same problem. I believe that the build container does not have a static IP address so the database will not allow my Next.js app to statically generate pages as it is calling the db directly.

This is a problem for me as well. Deploying a next.js react app is therefore not an option with App platform… Next js relies on accessing dynamic db resources to build dynamic url paths during build time…