YunoHost-Apps / vaultwarden_ynh

Open source password management solutions for YunoHost
https://bitwarden.com/
GNU General Public License v3.0
58 stars 18 forks source link

Support use of Postgresql as the backend DB #207

Open rob-hills opened 2 years ago

rob-hills commented 2 years ago

As far as I can tell, the YunoHost Vaultwarden app does not support Postgresql as the backend database.

During installation there is no option to specify the type of database storage.

If you follow the Vaultwarden Instructions for using Postgresql, when you start the Vaultwarden service after modifying the .env file to specify the Postgresql connection URL, it fails to start, giving the error message: `DATABASE_URL` is a PostgreSQL URL, but the 'postgresql' feature is not enabled

Researching this error indicates that Vaultwarden needs to be compiled with Postgresql support enabled for this to work.

Ideally the YunoHost App Installation process would give the user the choice between SQLite and Postgres, and modify the build process accordingly.

Alternatively, the build could include support for Postgresql and those users who wish to use it could follow the instructions I linked above.

yalh76 commented 2 years ago

Now the package use the vaulwarden binaries extract from the docker image, it includes postgresl support

For the choice of the database during install, I'm not sure of that, It would increase complexity of the package and a lot of users don't know the difference between sqlite and postgresql