Skip to content
This repository has been archived by the owner on Aug 29, 2022. It is now read-only.

Can Multiple Containers Share One bg-sync service/mount point? #29

Open
henrymazza opened this issue Apr 8, 2021 · 2 comments
Open

Comments

@henrymazza
Copy link

I assumed it could, but it only syncs to the first service specified in the volumes_from list. Plus: my containers won't share the same mount: with docker inspect shows that each one has a distinct mount point. Is it an intrinsic limitation or am I missing something in the configs?

services:
  web:
    working_dir: /app-sync
    volumes:
      - /app-sync

  spring:
    working_dir: /app-sync
    volumes:
      - /app-sync

  sidekiq:
    working_dir: /app-sync
    volumes:
      - /app-sync

  bg-sync:
    image: cweagans/bg-sync
    volumes:
      - .:/source
    volumes_from:
      - spring
      - web
      - sidekiq
    environment:
      - SYNC_DESTINATION=/app-sync
      - SYNC_MAX_INOTIFY_WATCHES=40000
      - SYNC_VERBOSE=1
    privileged: true
@cweagans
Copy link
Owner

cweagans commented Apr 8, 2021

I've never used it in this particular configuration, so I'm not sure if this will work or not. Generally speaking, it just syncs from one dir to another, so if there's some way of having a docker container with a volume at /foo, and have 1+ other containers all mount the volume from the first container, then there should be some way of getting this container to do what you want to do.

@cweagans
Copy link
Owner

cweagans commented Apr 8, 2021

(also, I haven't been spending much time on this lately -- https://mutagen.io/ has been a much nicer solution that isn't so touchy)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants