Rails 3大尺寸的应用(大约65MB)
-
14-12-2019 - |
题
应用程序大小为65MB。当有最大的大小有文件夹/vendor/bundle
- 几乎<强大> 63MB 。
所以问题是 - 为什么?我怎样才能减少它? 我正在使用caipstrano部署我的应用程序,它需要很多时间...
解决方案
我确信每次都必须上传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中拉出所有内容,然后每部部署都只会向下拉出更改。
这也适用于颠覆。
不隶属于 StackOverflow