Why does my app fail to build while trying to connect to a DigitalOcean Managed Database?

App Platform does not support connecting to DigitalOcean Managed Databases during the build process if the database has trusted sources enabled. This is because the app’s network configuration information can only be provided to the database’s trusted sources list after the app has been built.

This limitation is by design.

As a workaround, you can temporarily disable trusted sources for your app. However, we recommend not connecting your database to your app at build time. This keeps the build process self-contained and independent of external services that might otherwise cause the build to fail.

Dedicated egress IPs route egress (outbound) traffic from an app. To route ingress (inbound) traffic to an app, use one of App Platform’s public ingress IPs.
Add the root domain to the list of domains in the app’s settings along with the wildcard subdomain.
App Platform apps may be slow or unable to resolve .gov domains because the domain administrators have blocked DigitalOcean’s IP addresses. To fix this, you can contact the domain administrator or use a custom DNS resolver.