mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-12-09 09:13:02 +03:00
How to specify connection string to Sqlite as an environment variable? #1824
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tynor88 on GitHub.
Subject of the issue
Is it possible to specify the SQLite connectionstring, to mitgate WAL issues when hosting with Azure Files? It is possible with e.g. grafana, as specified here:
https://github.com/grafana/grafana/issues/20549#issuecomment-580743349
@BlackDex commented on GitHub:
@TynThordin you can't.
If you want to change the settings of the sqlite database you need to do that afterwards using the sqlite3 tool it self.
Please see: https://www.sqlite.org/pragma.html
@dani-garcia commented on GitHub:
If you mean adding the
?cache=private&mode=rwcbits, you could try adding it to the DATABASE_URL parameter, you shouldn't need the journal_mode=WAL because that's already set by code.@yggdrasil-tynor commented on GitHub:
@dani-garcia Sorry to disturb you. Do you have any idea how to circumvent this?
@voslucas commented on GitHub:
@yggdrasil-tynor @tynor88 did you find a solution for sqlite3 hosting on Azure Files?
@yggdrasil-tynor commented on GitHub:
@dani-garcia Thanks for the reply. However it does not work. It tries to create a file named db.sqlite3?cache=private&mode=rwc which obviously doesnt pass the settings to sqlite.
Any idea why it would do that?
@yggdrasil-tynor commented on GitHub:
Download the sqlitedb file and change the PRAGMA. See what @BlackDex linked to.
We are running it stable for a year now with azure files.