Skip to content

nekopanic/buildpack-slug-cleaner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

Slug cleaner buildpack

This buildpack helps large applications get in under the Heroku size limit. It extends .slugignore to allow the ! prefix and repurposes it to mean "run after the build", preventing files from reaching the final slug. Add it to the end of your buildpacks list so it runs last:

$ heroku buildpacks:add https://github.com/stevo550/buildpack-slug-cleaner.git

Many apps might like to add this to their .slugignore file:

# Rails asset pipeline cache won't be touched in production
!tmp/cache
# App images should have been compiled into public/
!app/assets/images
# Known useless files and directories
!wkhtmltopdf-darwin-x86
!wkhtmltopdf-linux-x86

The easiest way to investigate slug sizes is to do a heroku run bash on the last passing build and du -hs * from there. Slug sizes are usually something that increase over time, so you might find something useful even off a successful build.

If you find any good suggestions for other languages and frameworks send in a pull request or issue and I'll add it to the above.

About

Tidy up your Heroku slugs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages