General question about persistence SQLite

If I deploy a Python Application that uses SQLite on the same host will the data persist while the server is running? And will the data be cleared out when the server resets?
7 Replies
Percy
Percy9mo ago
Project ID: N/A
Joseph U.
Joseph U.OP9mo ago
N/A
Brody
Brody9mo ago
will the data persist while the server is running?
yes, keyword: while
And will the data be cleared out when the server resets?
correct, data in your sqlite database will be "cleared" when your redeploy for data persistence, you would want to use a volume and store the sqlite file in the volume https://docs.railway.app/guides/volumes
Joseph U.
Joseph U.OP9mo ago
Thank you. One last question. I am asking these questions in anticipation of deploying a Reflex application which has SQLite built in. I see you created a template here https://railway.app/template/A5TaaV Do I just need to add the extra files (i.e. nixpacks.toml, Caddyfile etc...) to my build prior to deploying? BTW really appreciate you setting this up and working out the kinks in getting it deployed.
Brody
Brody9mo ago
those files are critical for deployment, users leaving them out is why the template has a low score
No description
Joseph U.
Joseph U.OP9mo ago
Sounds good. I am glad to have this resource for when I am ready to attempt my first Reflex deploy. Thanks again for your help.
Brody
Brody9mo ago
no problem!
Want results from more Discord servers?
Add your server