-
Notifications
You must be signed in to change notification settings - Fork 5
SQLite persistent storage #40
Comments
I will try make the change so that Docker expects that file to be mounted, but I'm not sure if the migrations tool is going to like the file to exist. I will do some tests and see how can I solve this. However, I would recommend not to use SQLite in production. It might be a bottle neck. |
Thank you for the quick response. I know that the SQLite is not so fast, but this is my personal URL shortener, just for me, and I'm not expecting so heavy load. |
Hello @mac-iek. I have been doing some testing and it doesn't seem to be an easy solution for this. If the database file is exposed via a volume, then docker creates a file when the container is run, and then, when the database tool tries to populate the databse, it fails because it is not actually an SQLite-compliant file. I have tried different approaches in order to automate this, but none of them seem to really work. I would recommend you following one of these workarounds instead:
|
Hi there,
I'm looking for a way to use the Shlink with the SQLite but with the persistent storage for at least a DB (database.sqlite). Normally it's stored on the docker container space, which might be dangerous when you do messing around the stack.
Also I've created a
docker-compose.yml
with additional nginx setup (with let's encrypt and so on), so it would be great to have a possibility to define a mountpoint (a volume) with data like this (see the commented part):Unfortunately it doesn't work, because this volume mountpoint have to be there before the build, so probably a change in main Dockerfile is needed.
Do you have any ideas how to do this right?
Cheers,
Matt
The text was updated successfully, but these errors were encountered: