hassio-addons / addon-bitwarden

Vaultwarden (Bitwarden) - Home Assistant Community Add-ons
https://addons.community
MIT License
156 stars 43 forks source link

Option to specify a database url #285

Closed popoviciri closed 1 year ago

popoviciri commented 1 year ago

Problem/Motivation

Recently, I migrated from a docker setup of home assistant to haos. I currently also use the vaultwarden image with a mariadb database and wish to switch to this addon. However this addon has no option to use a different database than the default sqlite.

Expected behavior

Ideally the user could chose which database to use.

Actual behavior

Currently, only default db file data/sqlite3 file can be used with this addon. Vaultwarden can however work with for example core-mariadb addon. The database_url cannot be set in Bitwarden's admin panel but only as an environment variable at startup.

Steps to reproduce

n/a

Proposed changes

I have prepared a PR to add this unused databse_url option which I tested on a local instance. Would the devs of this repo be willing to consider it? I do not wish to pollute this repository otherwise. I am aware there are other issues related with the subject, but are stale and the proposed changes were just requests of exposing the environment variables supported by vaultwarden which are different than what I'm proposing.

Thanks very much for your consideration. Cheers!

frenck commented 1 year ago

This is not in scope for add-ons. If you need this kind of functionality, then this add-on is not for you. You should look into using Docker/container installation instead.

Closing this, as this is not an issue but an feature request.

../Frenck

popoviciri commented 1 year ago

I just reached out before submitting a PR, following your contributing guideline. But I get the codeowner's position , although I respectfully disagree. Personally I already use this addon with core-mariadb, so is working for me . Cheers and thanks for all the work!

EDIT: on a second thought I understand why such functionality is not in scope for addons. I update this comment with an explanation for the next person who is looking for such feature. Linking this addon with a different database, would introduce another mechanism on which the functionality of the addon will depend on. Currently the addon works as a standalone app. There are simply no advantages of using a different database than the simple sqlite db file already within the vaultwarden. It is not less safe and a potential performance improvement will be noticeable for much larger databases than a use case behind homeassistant.