Fairly new to ruby and cap but ive did research before posting.
Im deploying to a centos VPS with plesk.
This means I set the document roots from /var/www/vhosts/mydomain.com/
httpdocs to /rubydocs/domain.com/myapp/current
So far so good,
But I also need to
* Change file permissions on that domain.com to domain:psaserv
Tried this several times but it does not work
* I need to be able to create a database for my application currently
i have do this manually with mysql admin from the command line.
I wondered if this can be automated with cap ?
Hope this is in the right group,
anyone can guide me to some good howtos concerning cap, ruby on rails
and plesk or anyone so kind to share a recipe for the above 2
problems?
Thanks in advanche!
I haven tlooked into this after coudent get it to work.
The problem still exists but since i did not have to deploy yet I did
changes manually in ssh session on my server.
The problems are still exists. And I havent been able to find solution
1) Change file /group permissions on deploy directory to
domainname:psaserv
2) Creating datbase ( I guess I do that manually with plesk, since I
wont deploy more than a few apps anyway so this is not a big deal )
This is my current deploy.rb, could you point me to how to correct it
so it works?
Would highly appreciate, thanks. Changed some data so could be some
typo in it but it works without the file permissions
For permissions problem:
after "deploy", :change_permissions
after "deploy:migrations", :change_permissions
desc "Change permissions"
task :change_permissions, :roles => [ :app, :db, :web ] do
sudo "chown -R domain:psaserv #{deploy_to}"
end
To create a database:
desc "Create database"
task :create_database, :roles => [ :app, :db, :web ] do
run "cd #{current_path} && rake RAILS_ENV=production db:create"
end
Regards
--
Rafa