Versions: - Ruby - 2.0.0 - Capistrano - at branch master (almost v3.1.0) - Rake / Rails / etc - rails 4.0.1
Platform: - Working on.... linux - Deploying to... linux Files: - https://gist.github.com/crhan/8159771 Here is my situation: I have a bunch of servers(approximately 60) to deploy a rails app. And those servers may not have external internet access. So I have to install gem dependencies locally. Luckily, `bundle package` helped me a lot. But I still don't want to put those gem package file(in `vendor/cache`) into my commit log(too messy). ## The First Thought: upload cache from local to remote Here is my try, see the gist 8159771 <https://gist.github.com/crhan/8159771>. I have a gateway server (have fully internet access) to deploy app to remote servers. First, I make a check<https://gist.github.com/crhan/8159771#file-deploy-rb-L7>for local vendor/cache (cache packages on the gateway server). And then use SSHKit#upload! to upload cache dir<https://gist.github.com/crhan/8159771#file-deploy-rb-L17-L19>recursively to remote server. That works great when deploy to single server. But the upload progress become a nightmare when you want to deploy to more and more servers, especially those servers are in different Data-Centers. ## The Second Thought: make a git submodule in vendor/cache I'm not sure git submodule is supported in Capistrano v3. Further more, my app server may not have access to the git source code server (my gateway server also reverse proxy to git server, and set production :repo_url to gateway server). The biggest problem here is that I cannot specify different submodule git url in production mode, `git submodule update` may fail due to some kinds of internet error. ## The Last Thought: local tar -> scp -> untar This may be the best way I can imagine, but has not implemented yet. Looking for some suggestion, thank you -- You received this message because you are subscribed to the Google Groups "Capistrano" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web, visit https://groups.google.com/d/msgid/capistrano/9d07eb95-5740-42bf-9e3a-f6ea3ca6b4cb%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
