Reduce Heroku Compiled Slug Size

前端 未结 3 1221
广开言路
广开言路 2021-02-08 12:47

I\'ve just updated rails to v2.3.6 on my app under a bamboo-ree-1.8.7 stack and the compiled slug size has grown up to 40.5Mb! Previous to that last git push, the slug size was

3条回答
  •  北海茫月
    2021-02-08 13:31

    One thing that helps is adding a .slugignore file to the root of your project to tell Heroku not to compile certain files or directories into the slug. Mine looks like this:

    *.psd
    *.pdf
    test
    spec
    features
    doc
    public
    

    The public entry is in there because I serve all static files from Amazon's S3 service; just leave that line off if you're not using an external content-delivery system.

提交回复
热议问题