GithubHelp home page GithubHelp logo

nirbenz / heroku-buildpack-git-lfs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from radian-software/heroku-buildpack-git-lfs

0.0 0.0 0.0 15 KB

Heroku buildpack for git-lfs

License: MIT License

Shell 100.00%

heroku-buildpack-git-lfs's Introduction

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/radian-software/heroku-buildpack-git-lfs  \
    -a <myapp>

Set the following environment variable (i.e. using heroku config:set) 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.

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.

Tips

Pushing to Heroku from Git

If you are using Git LFS and want to deploy to Heroku using Git, make sure to provide the --no-verify flag to git push, since Heroku's Git server will reject LFS assets and this will cause an error otherwise.

Slug size too large

If your LFS assets are around 500 MB or more, you won't be able to use this buildpack. In fact, you won't be able to use any buildpack to get things working---Heroku simply has a max 500 MB size limit on the assets that are deployed as part of your application, and there is no way around this.

If you absolutely must deploy such large assets on Heroku, the only way to do it is to download them at runtime, after your application starts up. What you need to do is configure your server to trigger the downloads at startup, in the background, and successfully serve requests while that is happening (if the server hasn't bound to its port quickly enough then Heroku will kill and restart it).

This will require some substantial custom scripting knowledge specific to your application and that is unfortunately not something this buildpack can assist you with.

You may want to reconsider your architecture and/or deployment target if you find yourself in this situation.

heroku-buildpack-git-lfs's People

Contributors

koalalorenzo avatar lcmen avatar nirbenz avatar raxod502 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.