Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default sqlite DB location is not included in a Docker volume #68

Open
eanmclaughlin opened this issue Mar 2, 2023 · 4 comments
Open

Comments

@eanmclaughlin
Copy link

Description

The sqlite DB default location is ./vikunja.db (ie /app/vikunja/vikunja.db in the container).

The Docker configuration section of the docs indicates the only volume required for persistent data is to be mounted at /app/vikunja/files.

None of the sections of the full Docker example page are for an sqlite-based deployment.

Because of all of this, the example configurations and docs do not include the sqlite db file in any persistent storage, resulting in complete loss of user and task data when the container is restarted (I've now lost all my data twice because of this).

Possible fixes:

  • Update the Docker docs to include sections showing sqlite-based deployment configurations, with a new required volume mapped to the sqlite db file location.
  • Update the default location of the sqlite db file to be inside the /app/vikunja/files directory, which is already mapped to a volume in all current Docker examples.

Vikunja Frontend Version

v0.20.3

Vikunja API Version

v0.20.2

Browser and version

No response

Can you reproduce the bug on the Vikunja demo site?

No

Screenshots

No response

@kolaente
Copy link
Member

kolaente commented Mar 2, 2023

I think improving the docs is the way to go as most people won't use the docker image with sqlite and thus an extra volume would be unused in most of the cases.

Do you want to send a PR?

@eanmclaughlin
Copy link
Author

To be clear, the suggested new volume would only be for sqlite-based deployments.

Additionally, setting the default location of the sqlite db to be inside /app/vikunja/files would ensure things Just Work by default with the current docker configuration guidelines. Would not be an issue for existing sqlite deployments as those already either lose all data on restart or have non-default configuration.

I'm kind of surprised you think most won't use sqlite as this seems a great use case (at least for a single user deployment). I might be an outlier since I tend to want to minimize the number of containers I'm running, and I create and manage them via podman/shell scripts/generated systemd units rather than daemonized docker with compose files.

I'll go take a look at editing the docs to at least add some notes about sqlite docker deployments.

@kolaente
Copy link
Member

kolaente commented Mar 3, 2023

Additionally, setting the default location of the sqlite db to be inside /app/vikunja/files would ensure things Just Work by default with the current docker configuration guidelines. Would not be an issue for existing sqlite deployments as those already either lose all data on restart or have non-default configuration.

This would be a hard breaking change. People might have added a volume to store their sqlite db file, but not the config variable.
It would also affect everyone not using docker and sqlite which is more common than docker + sqlite.

I'm kind of surprised you think most won't use sqlite as this seems a great use case (at least for a single user deployment).

That's probably caused by the ease of spinning up new services with Docker.

I'll go take a look at editing the docs to at least add some notes about sqlite docker deployments.

+1

@tandy-1000
Copy link

tandy-1000 commented Mar 12, 2023

I look forward to these changes, as I also just bumped into this :)
Could you share your docker config @eanmclaughlin?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants