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

Add docs for sqlite #70

Merged
merged 2 commits into from
Apr 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
31 changes: 31 additions & 0 deletions docs/content/doc/setup/full-docker-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,37 @@ You'll also need to change the `VIKUNJA_DATABASE_TYPE` to `postgres` on the api
During this time, the api container will fail to start at all. It will automatically restart every few seconds.
</div>

## Sqlite

Vikunja supports postgres, mysql and sqlite as a database backend. The examples on this page use mysql with a mariadb container.
To use sqlite as a database backend, change the `api` section of the examples to this:
geekgonecrazy marked this conversation as resolved.
Show resolved Hide resolved

{{< highlight yaml >}}
api:
image: vikunja/api
environment:
VIKUNJA_SERVICE_JWTSECRET: <a super secure random secret>
VIKUNJA_SERVICE_FRONTENDURL: http://<your public frontend url with slash>/
# Note the default path is /app/vikunja/vikunja.db This moves to a different folder so you can use a volume and store this outside of the container so state is persisted even if container destroyed.
VIKUNJA_DATABASE_PATH: /db/vikunja.db
geekgonecrazy marked this conversation as resolved.
Show resolved Hide resolved
ports:
- 3456:3456
volumes:
- ./files:/app/vikunja/files
- ./db:/db
restart: unless-stopped
{{< /highlight >}}

The default path Vikunja uses for sqlite is relative to the binary, which in the docker container would be `/app/vikunja/vikunja.db`. This config moves to a different folder using `VIKUNJA_DATABASE_PATH` so you can use a volume at `/db` and store this outside of the container so state is persisted even if container destroyed.

You'll also need to remove or change the `VIKUNJA_DATABASE_TYPE` to `sqlite` on the api container declaration.
geekgonecrazy marked this conversation as resolved.
Show resolved Hide resolved

You can also remove the db section.

<div class="notification is-warning">
<b>NOTE:</b> If you'll use your instance with more than a handful of users, we recommend using mysql or postgres.
</div>

## Example without any proxy

This example lets you host Vikunja without any reverse proxy in front of it. This is the absolute minimum configuration
Expand Down