I’ve been using Vikunja under Unraid as Docker for a while now. Today I did the update, and now I can’t log in anymore. The Vikunja frontend and also the app connect to my server, but I get the message “User does not exist”.
Unfortunately, I don’t know much about Docker, but maybe my Vikunja database is broken? I hope that this will not be overwritten when I update the container?
I don’t know anything about unraid, so most of this is wild guesses.
Do you have a way to get a shell into the db container? I assume you have an overview of all running containers somewhere, maybe there’s an action for that?
Yes, I can start a console in each container. But I don’t have a separate database-container for Vikunja. I have installed the Vikunja-docker without any modifications, and it seems like it uses its own database inside this Vikunja-container (SQlite?)
When I start a console in the Vikunja-container and type “ls”, I see:
a folder “files”
a file “vikunja” (I guess it is a file, at least I cannot cd into it)
finally the database named “vikunja.db”
When I navigate to /files/config, the folder is empty.
If it’s using SQLite you should mount the db file to the host. Otherwise it won’t be persisted across restarts of the container. Similar for the files directory though that should persist it’s contents in a docker volume. Not sure how unraid handles these though.
Can you please show us how to mount the db file to the host in docker-compose.yml file?
Now every time I down and up the vikunja container, I lose all datas.
Do you get any messages like “Could not connect to db: could not open database file [uid=1001, gid=1001]: open ./vikunja.db: is a directory” when you run docker-compose up?
I’m trying to launch a version of this on my machine, but it looks like you’re trying to mount a folder as /app/vikunja/vikunja.db. This may reflect how you capture most databases (I’ll include mine for reference. It uses MySQL.), but an sqlite database is a file. you’d want to mount it the same way you would the config files, but with rw instead of ro.
You’ll need to create the file on the host first (run touch vikunja.db in the same directory as the compose file).
Another option would be to put the vikunja db file in a folder (change VIKUNJA_DATABASE_PATH to something like /database and then mount /database to a volume) and then mount that with a docker volume, the one you tried first.