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!
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.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
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