Fix Strapi + Digital Ocean App Platform : Could not load js config file config/database.js

I currently building strapi to DigitalOcean App Platform but when building throw Could not load js config file config/database.js: Cannot read property ’ charAt’ of undefined
I see this topic but it occur on Heroku: Could not load js config file config/database.js: Cannot read property ' charAt' of undefined.

After a few hours I found the cause.With DigitalOcean App Platform only occur when you choose database on it.It will config DATABASE_URL in RUN_TIME scope so you can edit to RUN_AND_BUILD_TIME scope by go Setting:

and scroll to end App Spec, edit like below image and try build again.