dadatuputi / bitwarden_gcloud

Bitwarden installation optimized for Google Cloud's 'always free' e2-micro compute instance
https://bradford.la/2020/self-host-bitwarden-on-google-cloud/
MIT License
344 stars 79 forks source link

rclone failed to create config file #67

Closed whyb0rn closed 1 year ago

whyb0rn commented 1 year ago

By default, rclone.conf file is located in the /data/rclone.conf folder, data folder in backup container is mounted as read-only, so rclone cannot create or modify the configuration file. Solution: change the path to rclone.conf and give the folder where the configuration file is located write permissions. Example: in .env change the line BACKUP_RCLONE_CONF=/data/rclone.conf to BACKUP_RCLONE_CONF=/data/rclone/rclone.conf and in docker-compose.yml add - ${PWD}/bitwarden/rclone:/data/rclone to volumes:

dadatuputi commented 1 year ago

That's not a bad solution, except I'm worried about those who have it in the old location getting a new docker-compose and not updating their .env and moving the file.

I'd like a solution that keeps backwards compatibility, especially when it comes to backups, but not sure there is one without being excessively hacky.

I did try to add a mount from ${PWD}/bitwarden/rclone.conf:/data/rclone/rclone.conf, however that fails to start when there is no rclone.conf in that location.

In the meantime I'm going to update the bitwarden mount to not be writable.

dadatuputi commented 1 year ago

I took another look at this, and came up with the changes as you suggested @whyb0rn-

Changes:

There are likely scenarios that I could imagine:

I'm happy with this solution, and will be pushing the changes. Thanks @whyb0rn.