# Sync project volumes with Unison
# For use with Docker for Mac osxfs.
# Pros: native fs performance, fast file sync, inotify/fs watchers support.
# Cons: 2x space usage (a mirror of the code base is maintained in a Docker volume), initial sync delay

version: "2.1"

volumes:
  project_root: # Project root volume
  db_data:  # Database data volume
  # Shared ssh-agent volume
  docksal_ssh_agent:
    external: true

services:
  # Sync project_root volume from host with unison 
  unison:
    image: docksal/unison
    volumes:
      - "${PROJECT_ROOT}:/source"
      - project_root:/destination
    environment:
      - SYNC_DESTINATION=/destination
      - SYNC_MAX_INOTIFY_WATCHES=524288
      - SYNC_VERBOSE=1
      - UNISON_USER=docker
      - UNISON_UID=${HOST_UID:-0}
      - UNISON_GROUP=dialout
      - UNISON_GID=${HOST_GID:-0}
    privileged: true

# Sync project volumes with Unison
# For use with Docker for Mac osxfs.
# Pros: native fs performance, fast file sync, inotify/fs watchers support.
# Cons: 2x space usage (a mirror of the code base is maintained in a Docker volume), initial sync delay

version: "2.1"

volumes:
  project_root: # Project root volume
  db_data:  # Database data volume
  # Shared ssh-agent volume
  docksal_ssh_agent:
    external: true

services:
  # Sync project_root volume from host with unison 
  unison:
    image: docksal/unison
    volumes:
      - "${PROJECT_ROOT}:/source"
      - project_root:/destination
    environment:
      - SYNC_DESTINATION=/destination
      - SYNC_MAX_INOTIFY_WATCHES=524288
      - SYNC_VERBOSE=1
      - SYNC_NODELETE_SOURCE=0
      - UNISON_USER=docker
      - UNISON_UID=${HOST_UID:-0}
      - UNISON_GROUP=dialout
      - UNISON_GID=${HOST_GID:-0}
    privileged: true

Fix a bug that unison volumes were not deleting files deleted in the container
Fix a bug that unison volumes were not deleting files deleted in the container
