Closed Harrisonbro closed 7 years ago
FYI, you can use the SYNC_EXTRA_UNISON_PROFILE_OPTS
environment variable for this. For example:
bg-sync:
image: cweagans/bg-sync
volumes:
- .:/source
volumes_from:
- web
environment:
SYNC_EXTRA_UNISON_PROFILE_OPTS: |
ignore = Path tmp/*
ignore = Path .ebextensions/*
ignore = Path .elasticbeanstalk/*
Great idea, thank you.
Note that .git is not synced by default (https://github.com/cweagans/docker-bg-sync/blob/master/sync.sh#L140-L143). If there are other things you need to ignore, the solution from @wvteijlingen is probably the correct one.
Is there a way to exclude certain files or folders from being synced? I'm thinking specifically of my
.git
directory which doesn't need to be synced into the container.