By Bluemont
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:
[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.
[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!
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!
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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.