Skip to content

Commit da26bae

Browse files
committed
deploy settings
1 parent 788a577 commit da26bae

5 files changed

Lines changed: 15 additions & 12 deletions

File tree

‎itamae/cookbooks/app/default.rb‎

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,18 @@
1515
execute 'deploy app' do
1616
user node[:user]
1717
command <<"EOC"
18-
DIR=#{node[:deploy_to]}.back/`date +%d%H%M%S` &&\
19-
mkdir -p $DIR;
20-
[ -e #{node[:deploy_to]} ] && rsync -au --remove-source-files #{node[:deploy_to]}/ $DIR/;
21-
ln -sf $DIR #{node[:deploy_to]}.back/current;
22-
rm -fr "#{node[:deploy_to]}-clone";
23-
GIT_SSH=#{git_ssh} git clone #{node[:repository]} #{node[:deploy_to]}-clone &&\
24-
ln -sf #{node[:deploy_to]}-clone/app #{node[:deploy_to]}
18+
GIT_SSH=#{git_ssh} git pull
19+
ln -sf #{node[:deploy_to]}-tmp/app/webapp #{node[:deploy_to]}/webapp
2520
EOC
26-
notifies :run, 'execute[app restart]'
21+
cwd "#{node[:deploy_to]}-tmp"
22+
end
23+
24+
execute 'bundle i' do
25+
user node[:user]
26+
command <<"EOC"
27+
~/local/ruby/bin/bundle install
28+
EOC
29+
cwd "#{node[:deploy_to]}/webapp/ruby"
2730
end
2831

2932
execute 'app restart' do

‎itamae/hosts/isucon1.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ isucon1:
22
properties:
33
run_list:
44
- roles/base/default.rb
5-
# - cookbooks/app/default.rb
5+
- cookbooks/app/default.rb
66
# - cookbooks/nginx/default.rb

‎itamae/hosts/isucon2.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ isucon2:
22
properties:
33
run_list:
44
- roles/base/default.rb
5-
# - cookbooks/app/default.rb
5+
- cookbooks/app/default.rb
66
# - cookbooks/nginx/default.rb

‎itamae/hosts/isucon3.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ isucon3:
22
properties:
33
run_list:
44
- roles/base/default.rb
5-
# - cookbooks/app/default.rb
5+
- cookbooks/app/default.rb
66
# - cookbooks/nginx/default.rb

‎itamae/site.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
node[:repository] = 'git@github.com:nna774/isucon8-suburi-pixiv-isucon.git'
22
node[:user] = 'isucon'
33
node[:home] = "/home/#{node[:user]}"
4-
node[:deploy_to] = "#{node[:home]}/deploy"
4+
node[:deploy_to] = "#{node[:home]}/torb"
55
node[:static_dir] = "#{node[:deploy_to]}/public"
66
node[:app_restart] = 'echo hello'
77

0 commit comments

Comments
 (0)