Capistrano
时间:2010-07-15
来源:595959
在手机上看
手机扫描阅读
http://help.github.com/capistrano/
#config/deploy.rb set :application, "app1" default_run_options[:pty] = true set :repository, "[email protected]:595959/app1.git" set :scm, :git # Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none` set :scm_passphrase, "p@ssw0rd" ssh_options[:forward_agent] = true set :user, "root" set :deploy_to, "/home/user1/app1.com" set :use_sudo, false role :web, "host.ip" # Your HTTP server, Apache/etc role :app, "host.ip" # This may be the same as your `Web` server ssh_options[:port] = 22 role :db, "host.ip", :primary => true # This is where Rails migrations will run namespace :deploy do %w(start stop restart).each do |action| desc "#{action} the Thin processes" task action.to_sym do find_and_execute_task("thin:#{action}") end end desc "Symlink shared configs and folders on each release." task :symlink_shared do run "ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml" run "ln -nfs #{shared_path}/config/environment.rb #{release_path}/config/environment.rb" run "ln -nfs #{shared_path}/config/environments/development.rb #{release_path}/config/environments/development.rb" run "ln -nfs #{shared_path}/config/environments/test.rb #{release_path}/config/environments/test.rb" run "ln -nfs #{shared_path}/config/environments/production.rb #{release_path}/config/environments/production.rb" run "ln -nfs #{shared_path}/config/thin.yml #{release_path}/config/thin.yml" run "ln -nfs #{shared_path}/config/initializers/session_store.rb #{release_path}/config/initializers/session_store.rb" run "ln -nfs #{shared_path}/public/assets #{release_path}/public/assets" run "ln -nfs #{shared_path}/public/avatars #{release_path}/public/avatars" end end namespace :thin do %w(start stop restart).each do |action| desc "#{action} the app's Thin Cluster" task action.to_sym, :roles => :app do run "thin #{action} -c #{deploy_to}/current -C #{deploy_to}/current/config/thin.yml" end end end after 'deploy:update_code', 'deploy:symlink_shared'
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28