capdocker 1.0.4 → 1.0.5
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 -0
- data/lib/docker_deploy.rb +6 -5
- 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: 2e9beb1d5ee612b6c36bb8a0a1e8fc1cc4a8f621
|
|
4
|
+
data.tar.gz: be0288a9b6a9ab070cf2df9e4420661896f2451b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 499c9cc6badce12a450d1f82457278562c09b2ef36c19a7a8b36befdb4e8d3445e8676472745fe33e3cd615f8f064cc3ec8ff714a1fd668257967bd32628f09e
|
|
7
|
+
data.tar.gz: 2ee94073c8ceeeb71e069e28793e2d0058d9c032e568b2ece16d32806ceba3e8e41f8c9e63a55198d3ae88e9fcb6b8aac7391260fe26850291d5c208ab1967d3
|
data/capdocker.gemspec
CHANGED
data/lib/docker.rb
CHANGED
|
@@ -7,6 +7,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
|
7
7
|
run "docker build -t oneblackbear/#{application} #{release_path}/"
|
|
8
8
|
run "docker ps | grep #{app_port} | awk '{print $1}' | xargs -n 1 docker kill"
|
|
9
9
|
run "docker run -p #{app_port}:80 -v /home/docker/data/#{application}/mysql:/data/mysql:rw -d -t oneblackbear/#{application}:latest"
|
|
10
|
+
puts "*** Application now deloyed to port #{app_port} ***"
|
|
10
11
|
end
|
|
11
12
|
end
|
|
12
13
|
|
data/lib/docker_deploy.rb
CHANGED
|
@@ -12,7 +12,8 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
|
12
12
|
|
|
13
13
|
desc "Deploys the project to docker server."
|
|
14
14
|
task :default do
|
|
15
|
-
|
|
15
|
+
update_code
|
|
16
|
+
create_symlink
|
|
16
17
|
restart
|
|
17
18
|
end
|
|
18
19
|
|
|
@@ -22,10 +23,6 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
|
22
23
|
run "mkdir -m0777 -p data/#{application}/mysql"
|
|
23
24
|
end
|
|
24
25
|
|
|
25
|
-
task :create_symlink do
|
|
26
|
-
run "ln -f -s #{basedir}/#{release_path}/platform/nginx_host.conf ./conf/nginx/#{application}.conf"
|
|
27
|
-
end
|
|
28
|
-
|
|
29
26
|
task :configure_platform do
|
|
30
27
|
host_content = from_template("templates/nginx_host.erb")
|
|
31
28
|
put host_content, "#{release_path}/platform/nginx_host.conf"
|
|
@@ -50,6 +47,10 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
|
50
47
|
run "rm #{release_path}/#{tag}"
|
|
51
48
|
end
|
|
52
49
|
|
|
50
|
+
task :create_symlink do
|
|
51
|
+
run "ln -f -s #{basedir}/#{release_path}/platform/nginx_host.conf ./conf/nginx/#{application}.conf"
|
|
52
|
+
end
|
|
53
|
+
|
|
53
54
|
task :restart do
|
|
54
55
|
run "sudo service nginx restart"
|
|
55
56
|
end
|