cap deploy和cap deploy:update有什么不同
我假设后者只是更新了一下--还有更好的见解吗?
发布于 2013-07-12 03:19:59
啊哈-通读源代码(deploy.rb)
namespace :deploy do
desc <<-DESC
Deploys your project. This calls both `update' and `restart'. Note that \
this will generally only work for applications that have already been deployed \
once. For a "cold" deploy, you'll want to take a look at the `deploy:cold' \
task, which handles the cold start specifically.
DESC
task :default do
update
restart
end因此,deploy先执行update,然后执行restart。
update只在服务器上执行更新。
发布于 2013-12-07 01:24:29
更新会添加一个新的发布文件夹并更改符号链接,但不会重新启动。如果您从服务器运行迁移,这将非常有用。例如,我们不允许远程数据库访问,因此要使用迁移进行部署,我们使用cap deploy:update,然后登录到服务器并运行迁移,然后使用cap deploy:restart。
如果您希望后台作业(例如cron作业,而不是长时间运行的守护进程)在无需重新启动web处理程序的情况下获得新的代码更改,则它也很有用。
https://stackoverflow.com/questions/17601586
复制相似问题