App Platform experience feels low-quality. Here is the list of issues.
I created an app on App Platform. I probably provided invalid creds for database, and the app fails to start. How can I get logs? doctl apps logs
gives me Error: error reading from websocket: websocket: close 1011 (internal server error)
The logs in admin console are empty
Then, it displays me an URL to my app (inside the HTTP Routes section) https://cloud.digitalocean.com/apps/null/
Probably some js programmer have not checked for null and just interpolated null as a string
Then, I pressed ‘Connect a database’ button twice, and I have the same database added twice for the same app, and there is no way to remove the second copy. When I tried to remove it from yaml, it refuses to save yaml
How does ‘Connect a database’ is intended to work? As far as I can see, it inject a DATABASE_URL
env var. Does it really help? My app does not recognize this env var, so it does not help me at all.
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!
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.
Hey Dmitry,
Thanks for sharing the details. A couple of things to keep in mind, if your app tries to connect to the database during the build phase, and your database uses trusted sources for connections, you should avoid DB connections during build time.
Regarding the logs, if the app crashes immediately, you won’t see any logs in the UI or via
doctl
. One workaround is to set a temporaryrun_command: sleep 3600
in your App Spec. That way the container stays alive long enough for you to inspect it.The
Connect a database
button injects aDATABASE_URL
environment variable, but your app needs to explicitly read that variable. If your framework doesn’t support that out of the box, you’ll need to wire it up manually.Lastly, yeah, the duplicate database issue can be annoying. If the UI doesn’t let you remove the second one and YAML editing fails, your best bet is to redeploy clean or contact support directly at https://do.co/support.
- Bobby