ddvk / rmfakecloud

host your own cloud for the remarkable
GNU Affero General Public License v3.0
705 stars 57 forks source link

Seperate "persitent data" directories for rmfakecloud docker container? #247

Closed Aephir closed 1 year ago

Aephir commented 1 year ago

I don't know if this is possible. If it is, I'd love to hear how, if not, I'd like to suggest this.

I have a directory I use for all "config" files related to docker containers (typically quite small files; on an internal partition that's quite small).

Can I keep the config files in my "normal" location (/mnt/data/docker/rmfakecloud), while mounting all data from the device to a different location (a folder on my mounted Nextcloud server, /mnt/nextcloud/some-path that has a lot of storage available)?

I know for some docker containers, you can just map additional volumes. Could you do something like this work:

  rmfakecloud:
    image: ddvk/rmfakecloud
    container_name: rmfakecloud
    restart: unless-stopped
    env_file:
      - rmfakecloud.env
    ports:
      - '10.0.30.21:3000:3000'
    volumes:
      - /mnt/data/docker/rmfakecloud:/data
      - /mnt/nextcloud/some-path:/data/users/$USERNAME/sync

where /mnt/nextcloud/some-path is the path to the Nextcloud mount, and $USERNAME is my rmfakecloud username?

From the file structure, I would imagine that you'd need to manually add a line for each user. But I'm not sure if this is even possible (and if so, if this is the correct approach). Or would I need to move the entire rmfakecloud config to the Nextcloud mount as well?

ddvk commented 1 year ago

i think this should work, but why don't you store the whole /data in nextcloud, there is no config data at the moment.

Aephir commented 1 year ago

That's what I ended up doing (and it works well) :)

I was thinking about the .userprofile file as the config. I know it's not a lot, I just prefer to keep all docker container configs in one place to better keep track and streamline config backup processes - I'm sure I'd mess it up if I had to keep track of custom locations for several dozen docker container configs...

Aephir commented 1 year ago

Actually, let me just close this; I'll likely just keep everything in the mounted Nextcloud volume now that it's set up like that.