0

该应用程序的大小为 65MB。当得到最大尺寸的文件夹时/vendor/bundle- 几乎63MB

所以问题是——为什么?我怎样才能减少它?我正在使用 caipstrano 部署我的应用程序,这需要很多时间......

4

1 回答 1

2

当应用程序每次都必须上传 65MB 时,我确信部署是一件痛苦的事情。您应该查看 /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 中提取,然后每次部署都只提取更改。

这也适用于颠覆。

于 2012-03-14T18:54:10.753 回答