-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-sync.yml
88 lines (65 loc) · 5.2 KB
/
docker-sync.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
options:
# default: docker-compose.yml if you like, you can set a custom location (path) of your compose file like ~/app/compose.yml
compose-file-path: 'docker-compose.yml'
# optional, default: docker-compose-dev.yml if you like, you can set a custom location (path) of your compose file. Do not set it, if you do not want to use it at all
# if its there, it gets used, if you name it explicitly, it HAS to exist
compose-dev-file-path: 'docker-compose-dev.yml'
# optional, activate this if you need to debug something, default is false
# IMPORTANT: do not run stable with this, it creates a memory leak, turn of verbose when you are done testin
verbose: false
# ADVANCED: default:eugenmayer/rsync - the image to use for the rsync container. Do not change this until you exactly know, what you are doing
# optional, default eugenmayer/rsync, you cannot just use "some unison" container, you entrypoint needs features, check the Dockerfiles
rsync_image: 'eugenmayer/rsync'
# ADVANCED: default:leighmcculloch/unison - the image to use for the unison container. Do not change this until you exactly know, what you are doing
# optional, default eugenmayer/unison, you cannot just use "some unison" container, you entrypoint needs features, check the Dockerfiles
unison_image: 'eugenmayer/unison'
# optional, default auto, can be docker-sync, thor or auto and defines how the sync will be invoked on the cli. Mostly depending if your are using docker-sync solo, scaffolded or in development ( thor )
cli_mode: 'auto'
syncs:
# IMPORTANT: this name must be unique and should NOT match your real application container name!
rol-sync:
# enable terminal_notifier. On every sync sends a Terminal Notification regarding files being synced. ( Mac Only ).
# good thing in case you are developing and want to know exactly when your changes took effect.
# be aware in case of unison this only gives you a notification on the initial sync, not the syncs after changes.
notify_terminal: true
# which folder to watch / sync from - you can use tilde (~), it will get expanded. Be aware that the trailing slash makes a difference
# if you add them, only the inner parts of the folder gets synced, otherwise the parent folder will be synced as top-level folder
src: '.'
# which destination on the sync-container. Since you will use volumes_from to mount this, this should match your code-deployment location in the real container
dest: '/usr/src/app'
# when a port of a container is exposed, on which IP does it get exposed. Localhost for docker for mac, something else for docker-machine
sync_host_ip: '127.0.0.1'
# should be a unique port this sync instance uses on the host to offer the rsync service on
sync_host_port: 10871
# optional, a list of excludes for rsync - see rsync docs for details
#sync_excludes: ['Gemfile.lock', 'Gemfile', 'config.rb', '.sass-cache/', 'sass/', 'sass-cache/', 'composer.json', 'bower.json', 'package.json', 'Gruntfile*', 'bower_components/', 'node_modules/', '.gitignore', '.git/', '*.coffee', '*.scss', '*.sass']
sync_excludes: ['config.rb', '.sass-cache/', 'sass/', 'sass-cache/', 'composer.json', 'bower.json', 'package.json', 'Gruntfile*', 'bower_components/', 'node_modules/', '.gitignore', '.git/', '*.coffee', '*.scss', '*.sass']
# use this to change the exclude syntax.
# Path: you match the exact path ( nesting problem )
# Name: If a file or a folder does match this string ( solves nesting problem )
# Regex: Define a regular expression
# none: You can define a type for each sync exclude, so sync_excludes: ['Name .git', 'Path Gemlock']
#
# for more see http://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-manual.html#pathspec
sync_excludes_type: 'Path'
# optional: use this to switch to rsync verbose mode
# sync_args: '-v'
# optional, a list of regular expressions to exclude from the fswatch - see fswatch docs for details
# optional, default can be either rsync or unison See Strategies in the wiki for explanation
sync_strategy: 'unison'
# sync_strategy: 'rsync'
# optional, use this to map the files to a specific user on sync. Helps fixing permissions. You can use names and uids
# sync_user: 'test'
# this does not user groupmap but rather configures the server to map
# optional: usually if you map users you want to set the user id of your application container here
# sync_userid: '5000'
# optional, use this to map the files to a specific group on sync. Helps fixing permissions, You can use names and guids
# sync_group: 'testgroup'
# optional: usually if you map groups you want to set the group id of your application container here
# this does not user groupmap but rather configures the server to map
# sync_groupid: '6000'
watch_excludes: ['.*/.git', './tmp', '.*/node_modules', '.*/bower_components', '.*/sass-cache', '.*/.sass-cache', '.*/.sass-cache', '.coffee', '.scss', '.sass', '.gitignore']
# optional: use this to switch to fswatch verbose mode
watch_args: '-v'
# optional: default is fswatch, if set to disable, no watcher will be used and you would need to start the sync manually
watch_strategy: 'fswatch'