Capistrano试用 博客分类: Ruby capistranoSSHSVNWebUP
程序员文章站
2024-02-22 16:50:04
...
1,客户端机器安装Capistrano
2,应用到项目
3,修改config\deploy.rb
4,调用task
gem install -y capistrano
2,应用到项目
cd D:\projects\beyondrails capify .
3,修改config\deploy.rb
DEPLOY_PATH = "/var/www/vhosts/hideto/html/www.beyondrails.com" set :application, "beyondrails" set :repository, "https://beyondrails.googlecode.com/svn/trunk/beyondrails" set :scm_username, "hideto.bj" set :scm_password, "######" set :deploy_to, DEPLOY_PATH set :user, "hideto" set :password, "######" ssh_options[:port] = 2048 role :app, "120.72.34.135" role :web, "120.72.34.135" role :db, "hideto", :primary => true desc "Restart the web server for www.beyondrails.com" task :restart, :roles => :app do run "cd ~;./restart-www.beyondrails.com.sh" quit end desc "Stop the web server for www.beyondrails.com" task :stop, :roles => :app do run "cd ~;./stop-www.beyondrails.com.sh" end desc "Update and restart web server for www.beyondrails.com" task :update_and_restart, :roles => :app do run "cd #{DEPLOY_PATH};svn up" run "cd #{DEPLOY_PATH};rake db:migrate" run "cd ~;./restart-www.beyondrails.com.sh" end
4,调用task
cap update_and_restart cap stop cap restart
推荐阅读
-
Capistrano试用 博客分类: Ruby capistranoSSHSVNWebUP
-
基于ruby-protobuf的rpc示例 博客分类: Ruby RubyGoogle
-
Rails3 and MongoDB Quick Guide 博客分类: Ruby MongoDBRailsEXT
-
Rails里如何结合ExceptionNotification配置gmail账户发邮件 博客分类: Ruby GmailRailsRubySVNGoogle
-
Ruby导出xls和csv的utf-8问题的解决 博客分类: Ruby RubyExcel
-
Skip List 跳表 博客分类: Infrastructure Ruby数据结构
-
C++和Ruby使用protobuf做Socket通信 博客分类: C++ RubyCC++C#Socket
-
Python编辑利器 --- PyCharm试用介绍 博客分类: Python PythonDjango编程SVNGit
-
selenium和ajax的测试问题 博客分类: ruby on rails AjaxRailsRubyJavaScriptChrome
-
Rmagick version 博客分类: ruby