0
votes

I want to setup a node with chef-solo where I can deploy with Capistrano. For this, I am thinking on using this cookbook:

However, the default setup makes 'root' own the application, which conflicts with my capistrano deploy.rb - where I use 'vagrant' as user.

So, how would I set the user for the above cookbook?

1

1 Answers

0
votes

I need to create the directory first with the right permissions:

directory "/u/apps" do
  owner "vagrant"
  group "vagrant"
  mode "0775"
  recursive true
end

web_app "myapp" do
  docroot "/u/apps/demo/current/public"
  template "myapp.conf.erb"
  server_name "myproj.#{node[:domain]}"
  server_aliases [ "myproj", node[:hostname] ]
  rails_env "development"
end