Trying to setup SQLite with Python script

Hello there,

I’m trying to set up a little telegram bot that I have running on my machine.

I did a turnaround to make sure the problem was around the DB, so with only memory allocation, it works partially.

I trying to set up an SQLite file so that my bot can read and write things on the file.

As it’s a “live bot” I have some info, but I’m ok to fill in the data again if needed.

I’m trying to figure out how to setup the SQLite on the Fly Volume.

I have already create the volume with 1Gb and looks fine.
I also tried to install open ssl so I can copy the file from my computer.

Any tips or tricks how I can approach this?


You could consider using either scp with flyctl proxy or flyctl sftp to transfer files to your VM: How to copy data to a volume? - #2 by ignoramous

Transfer the sqlite db file (if there’s one already) or open a new sqlite db on the mount point of the volume you created.

How big is your sqlite db? Depending on how you intend to bootstrap your db, embedding the db file in the docker image might work nicely.

1 Like

Hey @ignoramous

I’ll try it out.
I temporary solved that by using just memory as it was a pretty simple persistence, so now I’m willing to do it again, with another project, so I’ll try it out again.

Not sure how I can create a new sqlite db file in my volume.

My docker image is generated through fly machine, not sure if it’s possible to still add there. But I’ll take a look on that too.

Thanks for your time :slight_smile:

1 Like