Hi,
I thought the reason we use role:web, role:app and role:db was to make
capistrano deploy differently to each server (different files).
After doing some more reading I can see that update_code and symlink
tasks apply to all 3 servers (app, db and web) by default. However, I
need to do the following:
1) update_code, symlink and restart (with the full repository): on the
app server
2) update_code with only current/public directory contents: on the web
server (that's where I will put all the static data for the web
application)
3) only perform migration: on the db server
For app server, everything is fine with the default version, web server
is the problem one. Seems like I need to overwrite the update_code task
and call my version rather than the default one, which means I also
have to overwrite the deploy task.
this is the default update_code of Capistrano, notice it applies to all
3 servers (I dont know why...):
task :update_code, :roles => [:app, :db, :web] do
on_rollback { delete release_path, :recursive => true }
source.checkout(self)
run <<-CMD
rm -rf #{release_path}/log #{release_path}/public/system &&
ln -nfs #{shared_path}/log #{release_path}/log &&
ln -nfs #{shared_path}/system #{release_path}/public/system
CMD
end
And this is the default deploy task:
task :deploy do
transaction do
update_code
symlink
end
restart
end
Does anyone have any idea how I can change the update_code so that only
current_path/public directory contents get sent to my web server?
By the way, I am using local_perforce.rb extension from wolfmanjm to
check out the files locally from perforce and deploy to servers which
has no access to perforce:
http://groups-beta.google.com/group/capistrano/web/local_perforce.rb
I have also read the migration tasks in the standard.rb, default
migrate task needs this variable migrate_target to be set to either
current or latest. Can anyone clarify what's the difference between
current and latest? AFAIK, "rake migrate" migrates it to the latest
version and sets the current to the latest version.
many thanks
Julie
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---