docker-sync 0.4.4.beta1 → 0.4.4.beta2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 82b8bbe6b36b21f2f991a463b79d3008a0005d9d
4
- data.tar.gz: a89c8c32a63f9b553521f564a432971afee55435
3
+ metadata.gz: e2522724854fe3861a71bc30b5e20efe37d09f07
4
+ data.tar.gz: 341b4e4fc035377525704725f979b6b11560b7de
5
5
  SHA512:
6
- metadata.gz: 7420aa5f6a8b6c484b63f167aa9a77e51500d501c897a52921dd3929f59e34c25ef383e6894a69f68b4cd0135e1ff63a67e34e8d4305e41f65454869537af07f
7
- data.tar.gz: f30e1bcc306debb0a6057d70dd5d6f13a862990fdde0e7c69426d8fb539ff07ededff52bebd73c8b4564407f32ddd3ad2b1b6848f8aa2c3df35304f8075c768d
6
+ metadata.gz: 225f74aedc20bdeed4594bad491e04ef1645cfcb5556fca966a2142a6f3b76c5ff62d6cedf14256926346184eadc00f9eb3e6209ef7a68fa819f1b150793ddb9
7
+ data.tar.gz: 758eebc0c82db453f488dce3e85c3f599867b653feeda90e7008f11fe5cb0d72f431ae009c007269d3cf44ec4dd15fa089778eb82c2a247a9561a43fbaace5e6
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.4.beta1
1
+ 0.4.4.beta2
@@ -26,6 +26,10 @@ module Docker_Sync
26
26
  @docker_image = 'eugenmayer/unison:hostsync'
27
27
  end
28
28
 
29
+ # TODO: remove this when we have a more stable image, but for now, we need this
30
+ uc = UpdateChecker.new
31
+ uc.check_unison_hostsync_image(true)
32
+
29
33
  begin
30
34
  DockerSync::Preconditions::Strategy.instance.docker_available
31
35
  rescue Exception => e
@@ -36,7 +40,7 @@ module Docker_Sync
36
40
  end
37
41
 
38
42
  def start_container
39
- say_status 'ok', 'Starting native_osx', :white
43
+ say_status 'ok', "Starting native_osx for sync #{@sync_name}", :white
40
44
  container_name = get_container_name
41
45
  host_sync_src = @options['src']
42
46
  volume_app_sync_name = @sync_name
@@ -72,7 +76,7 @@ module Docker_Sync
72
76
  `#{cmd}` || raise('Precopy failed')
73
77
  say_status 'ok', 'Starting container', :white if @options['verbose']
74
78
  # 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}"
79
+ cmd = "docker run -d -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}"
76
80
  else
77
81
  say_status 'ok', "starting #{container_name} container", :white if @options['verbose']
78
82
  cmd = "docker start #{container_name} && docker exec #{container_name} supervisorctl restart unison"
@@ -84,7 +84,8 @@ module Docker_Sync
84
84
  # this container exposes a named volume and is on one side used as the rsync-endpoint for the
85
85
  # local rsync command, on the other side the volume is mounted into the app-container to share the code / content
86
86
  def start_container
87
- say_status 'ok', 'Starting rsync', :white
87
+ say_status 'ok', "Starting rsync for sync #{@sync_name}", :white
88
+
88
89
  container_name = get_container_name
89
90
  volume_name = get_volume_name
90
91
  running = `docker ps --filter 'status=running' --filter 'name=#{container_name}' --format "{{.Names}}" | grep '^#{container_name}$'`
@@ -142,7 +142,8 @@ module Docker_Sync
142
142
  end
143
143
 
144
144
  def start_container
145
- say_status 'ok', 'Starting unison', :white
145
+ say_status 'ok', "Starting unison for sync #{@sync_name}", :white
146
+
146
147
  container_name = get_container_name
147
148
  volume_name = get_volume_name
148
149
  env = {}
@@ -67,14 +67,14 @@ class UpdateChecker
67
67
 
68
68
  end
69
69
 
70
- def check_unison_hostsync_image
71
- say_status 'ok','Checking if a newer native_osx (unison:hostsync) image is available'
70
+ def check_unison_hostsync_image(silent = false)
71
+ say_status 'ok','Checking if a newer native_osx (unison:hostsync) image is available' unless silent
72
72
 
73
73
  if system("docker pull eugenmayer/unison:hostsync | grep 'Downloaded newer image for'")
74
- say_status 'ok', 'Downloaded newer image for native_osx', :green
74
+ say_status 'ok', 'Downloaded newer image for native_osx', :green unless silent
75
75
  @newer_image_found = true
76
76
  else
77
- say_status 'ok', 'No newer image found - current image is up to date.'
77
+ say_status 'ok', 'No newer image found - current image is up to date.' unless silent
78
78
  end
79
79
 
80
80
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docker-sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4.beta1
4
+ version: 0.4.4.beta2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eugen Mayer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-08 00:00:00.000000000 Z
11
+ date: 2017-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor