Skip to content
Browse files

symfony1 setup

  • Loading branch information...
1 parent 463b11a commit 57dfd7b31cea5f85b8ad19183c3cf017d277093a @mykehsd committed Feb 21, 2013
Showing with 12 additions and 1 deletion.
  1. +12 −1 phpapp/recipes/appsetup.rb
View
13 phpapp/recipes/appsetup.rb
@@ -1,14 +1,25 @@
node[:deploy].each do |app_name, deploy|
+ script "setup_symfony1" do
+ interpreter "bash"
+ user "root"
+ cwd "#{deploy[:deploy_to]}/current"
+ code <<-EOH
+ sudo chown -R www-data cache
+ EOH
+ only_if "test -d #{cwd}/cache"
+ end
+
script "install_composer" do
interpreter "bash"
user "root"
cwd "#{deploy[:deploy_to]}/current"
code <<-EOH
curl -s https://getcomposer.org/installer | php
php composer.phar install
+ mkdir app/logs app/cache
sudo chown -R www-data app/logs app/cache/
EOH
- only_if "test -f app/logs"
+ only_if "test -f #{cwd}/composer.json"
end
end

0 comments on commit 57dfd7b

Please sign in to comment.
Something went wrong with that request. Please try again.