Skip to content

Instantly share code, notes, and snippets.

@ojhaujjwal
Created June 10, 2018 11:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ojhaujjwal/5de74ed06fa5bbace81468e8b73b02fc to your computer and use it in GitHub Desktop.
Save ojhaujjwal/5de74ed06fa5bbace81468e8b73b02fc to your computer and use it in GitHub Desktop.
version: "2"
services:
app-rsync:
volumes:
- appcode-rsync-sync:/var/www:nocopy # will be mounted on /var/www
# that the important thing
volumes:
appcode-rsync-sync:
external: true
# This is our production compose file - not changed for docker-sync or similar
version: "2"
services:
app-rsync:
image: alpine
command: ['watch', '-n3', 'cat /var/www/index.html']
version: "2"
options:
verbose: true
syncs:
#IMPORTANT: ensure this name is unique and does not match your other application container name
appcode-rsync-sync: #tip: add -sync and you keep consistent names as a convention
src: './app/'
sync_host_ip: 'auto'
sync_host_port: 10872
sync_strategy: 'rsync'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment