docker-sync 0.4.3 → 0.4.4.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/docker-sync/sync_manager.rb +1 -1
- data/lib/docker-sync/sync_strategy/native_osx.rb +10 -1
- data/lib/docker-sync/upgrade_check.rb +5 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82b8bbe6b36b21f2f991a463b79d3008a0005d9d
|
4
|
+
data.tar.gz: a89c8c32a63f9b553521f564a432971afee55435
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7420aa5f6a8b6c484b63f167aa9a77e51500d501c897a52921dd3929f59e34c25ef383e6894a69f68b4cd0135e1ff63a67e34e8d4305e41f65454869537af07f
|
7
|
+
data.tar.gz: f30e1bcc306debb0a6057d70dd5d6f13a862990fdde0e7c69426d8fb539ff07ededff52bebd73c8b4564407f32ddd3ad2b1b6848f8aa2c3df35304f8075c768d
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.4.beta1
|
@@ -44,7 +44,7 @@ module Docker_sync
|
|
44
44
|
puts 'Please do no longer use "dest" in your docker-sync.yml configuration - also see https://github.com/EugenMayer/docker-sync/wiki/1.2-Upgrade-Guide#dest-has-been-removed!'
|
45
45
|
exit 1
|
46
46
|
else
|
47
|
-
@config_syncs[name]['dest'] = '/
|
47
|
+
@config_syncs[name]['dest'] = '/app_sync'
|
48
48
|
end
|
49
49
|
|
50
50
|
# for each strategy check if a custom image has been defined and inject that into the sync-endpoints
|
@@ -54,6 +54,9 @@ module Docker_Sync
|
|
54
54
|
env['OWNER_UID'] = @options['sync_userid'] if @options.key?('sync_userid')
|
55
55
|
end
|
56
56
|
|
57
|
+
host_disk_mount_mode = '' # see https://github.com/moby/moby/pull/31047
|
58
|
+
host_disk_mount_mode = ":#{@options['host_disk_mount_mode']}" if @options.key?('host_disk_mount_mode')
|
59
|
+
|
57
60
|
additional_docker_env = env.map{ |key,value| "-e #{key}=\"#{value}\"" }.join(' ')
|
58
61
|
running = `docker ps --filter 'status=running' --filter 'name=#{container_name}' --format "{{.Names}}" | grep '^#{container_name}$'`
|
59
62
|
if running == ''
|
@@ -63,7 +66,13 @@ module Docker_Sync
|
|
63
66
|
say_status 'ok', "creating #{container_name} container", :white if @options['verbose']
|
64
67
|
run_privileged = ''
|
65
68
|
run_privileged = '--privileged' if @options.key?('max_inotify_watches') #TODO: replace by the minimum capabilities required
|
66
|
-
|
69
|
+
say_status 'ok', 'Starting precopy', :white if @options['verbose']
|
70
|
+
# we just run the precopy script and remove the container
|
71
|
+
cmd = "docker run --rm -v #{volume_app_sync_name}:/app_sync -v #{host_sync_src}:/host_sync#{host_disk_mount_mode} -e HOST_VOLUME=/host_sync -e APP_VOLUME=/app_sync -e TZ=${TZ-`readlink /etc/localtime | sed -e 's,/usr/share/zoneinfo/,,'`} #{additional_docker_env} #{run_privileged} --name #{container_name} #{@docker_image} /usr/local/bin/precopy_appsync"
|
72
|
+
`#{cmd}` || raise('Precopy failed')
|
73
|
+
say_status 'ok', 'Starting container', :white if @options['verbose']
|
74
|
+
# this will be run below and start unison, since we did not manipulate CMD
|
75
|
+
cmd = "docker run -v #{volume_app_sync_name}:/app_sync -v #{host_sync_src}:/host_sync -e HOST_VOLUME=/host_sync -e APP_VOLUME=/app_sync -e TZ=${TZ-`readlink /etc/localtime | sed -e 's,/usr/share/zoneinfo/,,'`} #{additional_docker_env} #{run_privileged} --name #{container_name} #{@docker_image}"
|
67
76
|
else
|
68
77
|
say_status 'ok', "starting #{container_name} container", :white if @options['verbose']
|
69
78
|
cmd = "docker start #{container_name} && docker exec #{container_name} supervisorctl restart unison"
|
@@ -111,6 +111,11 @@ class UpgradeChecker
|
|
111
111
|
checker.check_unison_hostsync_image
|
112
112
|
end
|
113
113
|
|
114
|
+
if Gem::Version.new(last_upgraded_version) < Gem::Version.new('0.4.4')
|
115
|
+
checker = UpdateChecker.new
|
116
|
+
checker.check_unison_hostsync_image
|
117
|
+
end
|
118
|
+
|
114
119
|
# update the upgrade_status
|
115
120
|
@config.update! 'upgrade_status' => "#{UpgradeChecker.get_current_version}"
|
116
121
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docker-sync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.4.beta1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eugen Mayer
|
@@ -193,9 +193,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
193
193
|
version: '2.0'
|
194
194
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
195
195
|
requirements:
|
196
|
-
- - "
|
196
|
+
- - ">"
|
197
197
|
- !ruby/object:Gem::Version
|
198
|
-
version:
|
198
|
+
version: 1.3.1
|
199
199
|
requirements: []
|
200
200
|
rubyforge_project:
|
201
201
|
rubygems_version: 2.4.5.1
|