简体   繁体   English

为什么要在heroku上使用buildpack?

[英]Why use a buildpack on heroku?

I have run across more and more references to buildpacks for heroku apps. 我遇到了越来越多的针对heroku应用程序的buildpack的参考。 Other then needed a buildpack that is not support by heroku, why define this parameter in the app creation? 其他人则需要heroku不支持的buildpack,为什么要在应用程序创建中定义此参数? I have see references to speed increases for NPM using caching. 我看到了有关使用缓存提高NPM速度的参考。 Some context would help. 一些上下文会有所帮助。

If you are running one of Heroku's supported languages, and not encountering any bugs, than I certainly wouldn't bother with a custom buildpack. 如果您正在运行Heroku支持的一种语言,并且没有遇到任何错误,那么我当然不会为定制的buildpack所困扰。 But, if either of those are not true, a buildpack gives you the tools to fix the situation yourself. 但是,如果其中任何一个都不正确,buildpack会为您提供自行解决问题的工具。 More info here: https://devcenter.heroku.com/articles/buildpacks 此处提供更多信息: https : //devcenter.heroku.com/articles/buildpacks

I build Ruby apps and got fed up of have to run rake db:migrate whenever I deploy a development application to Heroku so I tweaked the standard Ruby buildpack to add in this step and use it when I deploy my applications. 我构建了Ruby应用程序,并且在每次将开发应用程序部署到Heroku时都不得不运行rake db:migrate,因此我调整了标准的Ruby构建包以在此步骤中添加并在部署应用程序时使用它。 I you have something that you typically perform 'around' a deployment then it's something that suitable for incorporating into a buildpack. 我有一些通常在部署周围执行的东西,那么它很适合合并到buildpack中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM