go-vikunja / vikunja

Mirror of vikunja from https://code.vikunja.io/api
GNU Affero General Public License v3.0
806 stars 57 forks source link

Could not connect to db: could not open database file [uid=1000, gid=0]: open /db/vikunja.db: permission denied #281

Closed mdlaat closed 3 weeks ago

mdlaat commented 3 weeks ago

Description

After pulling the latest docker version, the container exists with a error in the logs: CRITICAL ▶ migration/initMigration 002 Could not connect to db: could not open database file [uid=1000, gid=0]: open /db/vikunja.db: permission denied

In my docker run I have two lines: -e PUID=${uid} \ -e PGID=${gid} \

The uid and gid are not changed since earlier versions. The /db/vikunja.db file is owned by this uid and gid. It looks the migration script is ignoring these settings (see above error) and used uid=1000 and gid=0

Vikunja Version

docker.io/vikunja/vikunja:latest

Browser and version

No response

Can you reproduce the bug on the Vikunja demo site?

Please select

Screenshots

No response

kolaente commented 3 weeks ago

Since Vikunja now uses the scratch docker image as base image, the env variables do not work anymore. I've clarified this in the release notes: https://vikunja.io/changelog/whats-new-in-vikunja-0.24.0/#docker-image-now-uses-scratch-as-base