capistrano-docker 0.0.01 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a592fc849c9d22346829a7c36469511f958f6ed4
4
- data.tar.gz: c54393b6fa06d26e7af161d460b5c597ab55fadc
3
+ metadata.gz: 738b52f5ebbc979cfa353956cb91aa1004adf2fb
4
+ data.tar.gz: 1fd51047f862f0c80c49df490f7311b88f3d003f
5
5
  SHA512:
6
- metadata.gz: 3da59a8592defba7141b6c595ff6251f635bf1abe3b958277112510b5ed04dd314d385e09972ef1e8ff8a9bde71793f1fbe8919015be045e537baf33da7b859b
7
- data.tar.gz: cbfa3ff8723cf116ffd84c65048b2854ce4a5bcb2f911aca40917fd0fb58ef0c58a01d2ed6b841bce92b4285dd3a6d819a5cb56d48507bc8f0ebee5fe9d5ee2f
6
+ metadata.gz: 7d56ae10e506c9601767d271c624cdea641a56b88c2d441419c1bf0360743a8976acf629f716446d58960fe0f65e5e70de1724636874779cb1ccab3f9eaec9e6
7
+ data.tar.gz: 5f6796ef8a74ab9cf2122d09240fc24891a4f2e339ef8f0d14f433a3c0676bab30e9f6af5df407540e65c5efbe0d2f865edcf26a92eb46c085e719117ad1015e
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'capistrano-docker'
7
- spec.version = '0.0.01'
7
+ spec.version = '0.0.2'
8
8
  spec.authors = ["Ross Riley"]
9
9
  spec.email = ["riley.ross@gmail.com"]
10
10
  spec.description = %q{Docker support for Capistrano 3.x}
@@ -66,7 +66,7 @@ namespace :deploy do
66
66
  on roles :host do |host|
67
67
  info " Running Rsync to: #{host.user}@#{host.hostname}"
68
68
  run_locally do
69
- execute "rsync -rup --exclude '.git' tmp/build/* #{host.user}@#{host.hostname}:#{fetch(:docker_buildpath)}/"
69
+ execute "rsync -rupl --exclude '.git' tmp/build/* #{host.user}@#{host.hostname}:#{fetch(:docker_buildpath)}/"
70
70
  end
71
71
  end
72
72
  end
@@ -12,7 +12,7 @@ namespace :docker do
12
12
  desc "build an updated box, restart container"
13
13
  task :build do
14
14
  on roles :host do
15
- execute "docker build --no-cache=true -t #{fetch(:docker_appname)}_img #{fetch(:docker_buildpath)}/"
15
+ execute "docker build -t #{fetch(:docker_image)} #{fetch(:docker_buildpath)}/"
16
16
  execute "docker kill #{fetch(:docker_appname)}" rescue ""
17
17
  execute "docker rm #{fetch(:docker_appname)}" rescue ""
18
18
  execute build_run_command
@@ -29,10 +29,10 @@ namespace :docker do
29
29
  cmd << "-v `pwd`/#{fetch(:docker_mountpath)}/#{name}:#{vol}:rw "
30
30
  end
31
31
  cmd << "-name #{fetch(:docker_appname)} "
32
- cmd << "-e APP_USER='#{fetch(:docker_appname)}' "
33
- cmd << "-e APP_PASS='#{fetch(:password)}' "
34
- cmd << "-e APP_DB='#{fetch(:docker_appname)}' "
35
- cmd << "-d -t #{fetch(:docker_appname)}_img:latest "
32
+ cmd << "-e APP_USER='#{fetch(:app_username)}' "
33
+ cmd << "-e APP_PASS='#{fetch(:app_password)}' "
34
+ cmd << "-e APP_DB='#{fetch(:app_db)}' "
35
+ cmd << "-d -t #{fetch(:docker_image)}:latest "
36
36
  cmd
37
37
  end
38
38
  end
@@ -45,6 +45,10 @@ namespace :load do
45
45
  set :docker_buildpath, -> { "#{fetch(:docker_workpath)}/config" }
46
46
  set :docker_mountpath, -> { "#{fetch(:docker_workpath)}/mounts" }
47
47
  set :docker_appname, -> { "#{fetch(:namespace)}_#{fetch(:application)}" }
48
+ set :docker_image, -> { "#{fetch(:namespace)}_#{fetch(:image, fetch(:application))}" }
49
+ set :app_username, -> { "#{fetch(:docker_appname)}" }
50
+ set :app_password, -> { "#{fetch(:password)}" }
51
+ set :app_db, -> { "#{fetch(:app_username)}" }
48
52
 
49
53
 
50
54
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-docker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.01
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ross Riley
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-06 00:00:00.000000000 Z
11
+ date: 2014-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano