openstax / exchange

OpenStax Exchange
Other
5 stars 5 forks source link

Cache bundler gems #55

Closed Dantemss closed 8 years ago

Dantemss commented 8 years ago

This should make deployment faster and use less memory (so we can actually deploy exchange-dev).

The downside is that it adds 74MB to the repo size.

What do you think?

cnuber commented 8 years ago

We get about 7-10MB/sec download from github to our bastion server, so it'd add like 10-15 seconds max to the pull and probably reduce the deployment by 30-60 seconds. I consider that a win

Dantemss commented 8 years ago

An alternative would be to gitignore this and have the deployment script run bundle package --all. This would most likely not cause a repo size increase.

philschatz commented 8 years ago

:+1: for bundle package --all option (as someone w/o fiber hookup to my laptop :smile: )

Dantemss commented 8 years ago

Actually @philschatz looks like making the script run bundle package --all locally is not really an option because it would require devops to install bundler and everything... so maybe we'll just have to commit the gems to the repos...

philschatz commented 8 years ago

Is there no way for bundler to only download the new gems?

Dantemss commented 8 years ago

Setting the bundler --path to some constant folder in the deployment script would do that.