Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unison dual-sync feature unox for efficient syncing and with user/id mapping #64

Merged
merged 31 commits into from
Aug 2, 2016
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
5238549
[FEATURE] Sync / watch strategy unison with unox
mickaelperrin Jul 21, 2016
44f1c16
[BUGFIX] Unox syncing doesn't work in docker-sync
mickaelperrin Jul 21, 2016
e0d2c7e
[BUGFIX] Unison processes are not killed
mickaelperrin Jul 21, 2016
979914b
[BUGFIX] Remove code from previous PR
mickaelperrin Jul 21, 2016
21c7925
[TASK] Cleanup, remove unused code
mickaelperrin Jul 21, 2016
7987b24
[FEATURE] Add support for user/uid mapping
mickaelperrin Jul 21, 2016
a22ff51
[FEATURE] Prevent error if uid is already in use
mickaelperrin Jul 21, 2016
e3bfc11
[TASK] Add example for unison-unox
mickaelperrin Jul 21, 2016
ee9ff46
[FEATURE] Host port discovery
mickaelperrin Jul 21, 2016
4910928
[FEATURE] Set unison as default watcher for unox
mickaelperrin Jul 21, 2016
a28ec76
[BUGFIX] sync_host_port is no more checked
mickaelperrin Jul 21, 2016
2ca5715
[BUGFIX] sync_host_port is no more checked
mickaelperrin Jul 21, 2016
4d2c7fd
[TASK] Remove old code
mickaelperrin Jul 21, 2016
ada42b3
merge
mickaelperrin Jul 21, 2016
481a383
merge
mickaelperrin Jul 25, 2016
4820f16
[TASK] Remove factorization in execution.rb
mickaelperrin Jul 25, 2016
309801b
[TASK] Add some inline documentation
mickaelperrin Jul 25, 2016
c7514c3
[FEATURE] Increase maximum inotify watchers
mickaelperrin Jul 25, 2016
55a75a4
[FEATURE] Restart unison server on start
mickaelperrin Jul 25, 2016
282818b
[FEATURE] Add terminal notifier support
mickaelperrin Jul 25, 2016
75f35d0
[REFACTORING] Replace ugly sleep with process.wait
mickaelperrin Jul 26, 2016
c254f63
[FEATURE] Manage watcher limit on the host side
mickaelperrin Jul 26, 2016
e3ecf79
[BUGFIX] Unison doesn't catch file events
mickaelperrin Jul 26, 2016
e94d9e6
[TASK] Set default image as unison
mickaelperrin Aug 1, 2016
27c5928
[TASK] Info how to install unox in error message
mickaelperrin Aug 1, 2016
17688ba
[TASK] Merge master and conflict resolution
mickaelperrin Aug 1, 2016
224ecaf
[TASK] Rename unison-unox to unison
mickaelperrin Aug 1, 2016
1884f1a
[TASK] Update and fix example
mickaelperrin Aug 1, 2016
b569ac2
[TASK] Revert default image to unison:unox
mickaelperrin Aug 2, 2016
84baa85
[TASK] Use curl instead of wget in unox install
mickaelperrin Aug 2, 2016
5f288f2
[FEATURE] Auto install of unox
mickaelperrin Aug 2, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions lib/docker-sync/preconditions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,14 @@ def self.unison_available

def self.unox_available
if (find_executable0 'unison-fsmonitor').nil?
raise('Could not find unison-fsmonitor binary in path. Please install it, see https://github.com/hnsl/unox, or simply run :
curl "https://raw.githubusercontent.com/hnsl/unox/master/unox.py" -o "/usr/local/bin/unison-fsmonitor" \
&& chmod +x /usr/local/bin/unison-fsmonitor')
cmd = 'curl "https://raw.githubusercontent.com/hnsl/unox/master/unox.py" -o "/usr/local/bin/unison-fsmonitor" \
&& chmod +x /usr/local/bin/unison-fsmonitor'
Thor::Shell::Basic.new.say_status 'warning', "Could not find unison-fsmonitor binary in path. Please install unox before you continue, see https://github.com/hnsl/unox.", :yellow
if Thor::Shell::Basic.new.yes?("Shall I install unison-fsmonitor for you?")
`#{cmd}`
else
raise("Please install it, see https://github.com/hnsl/unox, or simply run :\n #{cmd}")
end
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perfect

end
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mickaelperrin a pitty there is now brew alternatives. I am thinking about creating a own tap and adding this.

Actually, in this case, use yes? and ask if the command should be run, run it automatically then. This makes the most sense here to ease up the installation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about auto install also, but as you didn't provide autoinstall of unison / fswatch / rsync... I stick with a simple help message on how to install.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason was, not everybody has brew. In your case, no dependencys are needed and its the only way to install. AFAIK wget is not part of OSX by default, you might want to use curl.

I will change the others also by the way, adding a question, like for the images

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

end
end
end