sanel
21 October 2024 02:57
1
I have been trying to run vikunja all day but I can’t get it to work. I use Portainer + sqlite db + 2 docker volumes for db and files
services:
vikunja:
image: vikunja/vikunja
environment:
- VIKUNJA_SERVICE_PUBLICURL=https://todo.lan/
- VIKUNJA_DATABASE_PATH=/db/vikunja.db
ports:
- 3456:3456
volumes:
- files:/app/vikunja/files
- db:/db
restart: unless-stopped
volumes:
db:
files:
I got error:
Could not connect to db: could not open database file [uid=1000, gid=0]: open /db/vikunja.db: no such file or directory
I know that Vikunja no longer support changing the uid and gid , but how can I run it with portainer now?
I have more than 20 different services running with Portainer - but this is the first time I’ve encountered something like this
Quoting from the docs :
To run the container, you need to create the directories first and make sure they have all required permissions:
mkdir $PWD/files $PWD/db
chown 1000 $PWD/files $PWD/db
Vikunja runs as user 1000 by default. Docker allows changing that , pretty sure there’s a way to do this with Portainer as well.
Yes, I know that way is working. But why we cannot use regular docker volumes? Why are you reinventing the wheel instead of following standards?
Probably, but I spent a day and still haven’t found a way. I hope someone who knows will tell us.
Vikunja needs write permissions in the volumes. Because the container does not run as root, it cannot set these permissions itself. It should still be possible to set these permissions on regular docker volumes but it seems to be a little more complicated . The fix here would be for Vikunja to create these volumes during the build process. Will look into making that work.
Seems to be possible in Portainer , not sure if that still works though.