该应用的尺寸为65MB。获得最大尺寸的文件夹/vendor/bundle
- 几乎 63MB 。
所以问题是 - 为什么?我怎样才能减少它? 我正在使用caipstrano部署我的应用程序,这需要花费很多时间......
答案 0 :(得分:2)
每次应用程序必须上传65MB时,我确信deploing很痛苦。您应该查看/config/deploy.rb文件中的deploy_via remote_cache选项
将其添加到/config/deploy.rb文件
set :deploy_via, :remote_cache
取自http://help.github.com/deploy-with-capistrano/
Remote Cache In most cases you want to use this option, otherwise each deploy will do a full repository clone every time. set :deploy_via, :remote_cache Remote caching will keep a local git repo on the server you’re deploying to and simply un a fetch from that rather than an entire clone. This is probably the best option as it will only fetch the changes since the last.
所以基本上发生的事情是,第一次部署应用程序时,所有内容都从repo中提取,然后每次部署只会更改下来。
这也适用于颠覆。