Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

remix/heroku-buildpack-git-lfs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 

Repository files navigation

Heroku buildpack for git-lfs

This is a Heroku buildpack which installs Git LFS and downloads your Git LFS assets during deployment (which Heroku does not do by default).

Usage

To configure Git LFS for your Heroku app called <myapp>, run:

$ heroku buildpacks:add                                   \
    https://github.com/raxod502/heroku-buildpack-git-lfs  \
    -a <myapp>

Set the following environment variable for your app:

  • BUILDPACK_GIT_LFS_REPO to the clone URL of the repository from which to download Git LFS assets. This should include any username, password, or personal access token which is necessary to clone noninteractively. See here for details on the syntax. It must be something like [email protected]:remix/remix
  • BUILDPACK_GIT_LFS_SSH_PRIVATE_KEY: your private key encoded in base64 with base64 -w 0. You can use heroku config:set --app preprod-bureauxlocaux "BUILDPACK_GIT_LFS_SSH_PRIVATE_KEY=$(cat ~/.ssh/heroku_deploy_lfs | base64 -w 0)" to set it.
  • BUILDPACK_GIT_LFS_INCLUDE_PATHS: (OPTIONAL) a comma-separated list of (relative) paths to include in the fetch. Passed via the --include flag to git lfs pull
  • BUILDPACK_GIT_LFS_EXCLUDE_PATHS: (OPTIONAL) a comma-separated list of (relative) paths to exclude in the fetch. Passed via the --exclude flag to git lfs pull

After the next time you deploy your app, Git LFS assets will be downloaded and checked out automatically, and Git LFS will be available on PATH for your app.

Inspiration was taken from the original repo and a buildpack to use SSH keys. This repository allows you to rely on deploy SSH keys to pull LFS files instead of requiring tokens. Also, added support to optionally specify relative paths of files to include/exclude when fetching lfs objects.

About

Heroku buildpack for git-lfs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%