-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
Hi, i'am trying to set up a new wiki for my company using sqlite as the database type.
I am having troubles using the environmental variable DB_FILEPATH when creating the container with the following command:
docker run -d -p 8000:3000 --name MyWiki--restart unless-stopped -e "DB_TYPE=sqlite" -e "DB_FILEPATH =/DB.sqlite" requarks/wiki:2.4
After finishing the setup the database is located in the container in the \wiki\ folder with a name of "undefined" without the .sqlite extension. This is mirrored in the "Systems info" in the administrative area:
How do i use DB_FILEPATH variable correctly in order to reflect the path/name i specified (DB.sqlite)? (My current workaround: in the container edit the config.yml and change storage: $(DB_FILEPATH) to storage: DB.sqlite and rename the file "undefined" to "DB.sqlite", seems to work and "System Info" prints the right file name.
Secondly, i would like to backup the sqlite file and restore it in a new container. Therefore i copied the sqlite file from container1 to my local file system, set up container2 with the same settings and copied the file into container2, overwriting the newly created db and restarted container2. Unfortunately this seems to break container2:

I do not understand the nature of the migration lock error, when i open the sqlite file there is a migrations_lock table but the value ist set to zero.

What would be the right way to backup and redeploy a sqlite database in a new container?
It's my first time working with a wiki and also docker, any input would be much appreciated. Thank you.
Host Info
OS: [Windows 10 Home, Docker]
Wiki.js version: [2.4.107]
