Question

My first DO app keeps failing on deployment

I am a code newbie, trying to deploy my first Python/flask app to DO. It uses SQLite as the db, which I know will need to be replaced with PostgreSQL or something more robust at some point, but for now, I just want a low-traffic prototype that I can show to prospective employers, etc.

When I go to deploy, the build phase seems to be successful (I get the checkmark and the build log finishes with “build complete”) but the deploy phase fails.

Two problems I hope to solve:

  1. On build phase, the log says it failed to install SQLite:
[2022-01-01 23:43:18] => Building app
[2022-01-01 23:43:18] 
[2022-01-01 23:43:19] -----> Using Python version specified in runtime.txt
[2022-01-01 23:43:19] -----> Installing python-3.10.1
[2022-01-01 23:43:35] -----> Installing pip 21.3.1, setuptools 57.5.0 and wheel 0.37.0
[2022-01-01 23:43:47] -----> Installing SQLite3
[2022-01-01 23:44:00] rm: cannot remove '/workspace/.heroku/python/apt/state/lists': Directory not empty
[2022-01-01 23:44:00] Sqlite3 failed to install.
  1. On deploy phase, it does not give me an error, but the log’s console outputs are identical to what I see when I launch the app on my local drive, which doesn’t seem right. There is no "live public URL’ where I can access my app on DO, probably because the deployment failed.
[2022-01-01 23:47:16]  * Serving Flask app 'application' (lazy loading)
[2022-01-01 23:47:16]  * Environment: production
[2022-01-01 23:47:16]    WARNING: This is a development server. Do not use it in a production deployment.
[2022-01-01 23:47:16]    Use a production WSGI server instead.
[2022-01-01 23:47:16]  * Debug mode: off
[2022-01-01 23:47:19] INFO:  * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)

Thanks for any help or suggestions you can offer!


Submit an answer


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.

Bobby Iliev
Site Moderator
Site Moderator badge
January 8, 2022
Accepted Answer

Hi there,

Indeed I think that it is due to the SQLite package. App Platform apps are deployed in containers that are ephemeral. In events such as new deployments, your app crashes, or there are cluster issues and we evacuate your app to another cluster all of the filesystem data will be gone.

What I could suggest is trying out Postgres as you mentioned. You could use the Dev Postgres component available in the App platform.

Let me know how it goes! Best, Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more