Thursday, March 27, 2008

config for capistrano

Preparing a deployment of an app
  1. Changes for fcgi configuration in public/.htaccess
    1. Comment the fcgi handler (found in initial few lines of the file)
    2. Change the dispatch.cgi reference to dispatch.fcgi (last few lines of file)
  2. In public/dispatch.fcgi change the shebang line to say something like this
    1. #!/usr/bin/env ruby
  3. Make sure everything is committed. (svn ci)
  4. capify the environment (capify)
  5. run rake configure_for_svn (assuming that the svn.rake task has been created already)
  6. edit config/deploy.rb to adjust values appropriately
  7. run cap deploy:setup
  8. On the remote server, copy $HOME/railsapps/config/database.yml.production to $HOME/${appdir}/shared/config (create target dir if not present). The $HOME/{appdir} should have been created by deploy:setup
  9. Since its the first time deployment, run cap deploy:cold
  10. Next time onwards, when you have to deploy, launch cap deploy:migrate

1 comment:

  1. I like this article very much because it is technical and very much useful for me to gather more knowledge. Good to read...

    ReplyDelete