Deploying Apps on disconnected environments
Cached buildpacks only ensure that the buildpack's dependencies are cached, not your applications.
When you work with a disconnected environment, it's important to use your package manager to 'vendor' your application's dependencies.
The specific mechanism varies between platforms. See your buildpack's documentation for 'vendoring' advice.
Building a cached buildpack
- Make sure you have fetched submodules
git submodule update --init
- Get the latest buildpack dependencies
- Build the buildpack
BUNDLE_GEMFILE=cf.Gemfile bundle exec buildpack-packager [ uncached | cached ]
This produces a buildpack for use on Cloud Foundry.
'cached' generates a zip with all the dependencies cached.
'uncached' does not include the dependencies, however it excludes some files as specified in manifest.yml.
- Use in Cloud Foundry
Currently, you can only specify cached buildpacks by creating Cloud Foundry Admin Buildpacks.
This means you need admin rights. See the open source admin documentation for more information.
Upload the buildpack to your Cloud Foundry and specify it by name:
cf create-buildpack custom_ruby_buildpack ruby_buildpack-cached-custom.zip 1