capdocker 1.0.29 → 1.0.30
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 +4 -4
- data/capdocker.gemspec +1 -1
- data/lib/docker.rb +1 -1
- data/lib/docker_deploy.rb +3 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 496da00d697f645181e991429e3b27fbdfa9ecc1
|
4
|
+
data.tar.gz: 785a9f82e61e255a1bcee767b765dfd3f26fb41f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34d7c65e7ac6efdfe0e05c07e6b261be35024f2213dc81d761cdbeef8de4dc3000d4b6d18bbdc17bb8846fe2969230ec4b217568bcba04df2104fbcfe32234de
|
7
|
+
data.tar.gz: 7d64f3275146e402d9d8c07ac2c1038da5a14779954c9ace30dc1b082e7479b1f0111278a2c7748a08326ea06fd9d02f21da585a9fa07d17f161ae1b9843c944
|
data/capdocker.gemspec
CHANGED
data/lib/docker.rb
CHANGED
@@ -5,7 +5,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
5
5
|
desc "build an updated box, restart container"
|
6
6
|
task :build do
|
7
7
|
run "docker build -t oneblackbear/#{application} containers/#{application}/"
|
8
|
-
run "docker
|
8
|
+
run "docker kill #{application}"
|
9
9
|
run build_run_command
|
10
10
|
puts "*** Application #{application} now deloyed to port #{app_port} ***"
|
11
11
|
end
|
data/lib/docker_deploy.rb
CHANGED
@@ -10,6 +10,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
10
10
|
set :user, "docker"
|
11
11
|
set :app_domain, "docker.oneblackbear.com"
|
12
12
|
set :app_port, random_app_number+8100
|
13
|
+
set :branch, "HEAD"
|
13
14
|
if roles.empty?
|
14
15
|
role :web, "obb1.oneblackbear.com"
|
15
16
|
end
|
@@ -72,8 +73,8 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
72
73
|
|
73
74
|
task :update_code do
|
74
75
|
puts "Pushing code for current git commit ..."
|
75
|
-
set :tag, %x[git rev-parse --short
|
76
|
-
run_locally "git archive
|
76
|
+
set :tag, %x[git rev-parse --short #{branch}].strip() + ".tar.gz"
|
77
|
+
run_locally "git archive #{branch} | gzip > #{tag}"
|
77
78
|
upload "#{tag}", "containers/#{application}", :via => :scp, :mkdir => true
|
78
79
|
run_locally "rm #{tag}"
|
79
80
|
run "cd containers/#{application} && tar -xzvf #{tag}"
|