简体   繁体   English

Heroku自定义buildpack fsharp

[英]Heroku custom buildpack fsharp

When you deploy the https://github.com/SuaveIO/heroku-getting-started example project to Heroku, the correct fsharp buildpack is used (specified in the app.json file). https://github.com/SuaveIO/heroku-getting-started示例项目部署到Heroku时,将使用正确的fsharp buildpack(在app.json文件中指定)。 Like so: 像这样:

{
  "name": "Sample Suave web app",
  "description": "Sample single-script Suave web app, deployable to Heroku.",
  "website": "http://suave.io/",
  "repository": "https://github.com/SuaveIO/heroku-getting-started",
  "logo": "https://raw.githubusercontent.com/SuaveIO/suave/gh-pages/images/logo.gif",
  "env": {
    "BUILDPACK_URL": "https://github.com/SuaveIO/mono-script-buildpack.git"
  }
}

However, if you want to deploy directly from github, the custom buildpack isn't used. 但是,如果您想直接从github进行部署,则不使用自定义buildpack。 The only way to get this running is by manually specifying the BUILPACK_URL config var in the web api of the web app. 使其运行的唯一方法是在Web应用程序的Web API中手动指定BUILPACK_URL配置变量。 So, why is this config var specified by the app.json not used? 那么,为什么不使用app.json指定的配置变量? Is there another way of specifying this config var, without having to add this manually to the dashboard -> settings -> config vars of the web app? 还有另一种指定此配置变量的方法,而不必手动将其添加到Web应用程序的仪表板->设置->配置变量?

Instead of using app.json, you can use heroku buildpacks command to set/remove/clear buildpacks. 您可以使用heroku buildpacks命令来设置/删除/清除buildpack,而不是使用app.json。 Here is the output of command heroku buildpacks -h : 这是命令heroku buildpacks -h的输出:

buildpacks:add BUILDPACK_URL       #  add new app buildpack, inserting into list of buildpacks if neccessary
buildpacks:clear                   #  clear all buildpacks set on the app
buildpacks:remove [BUILDPACK_URL]  #  remove a buildpack set on the app
buildpacks:set BUILDPACK_URL       #  set new app buildpack, overwriting into list of buildpacks if neccessary

The heroku toolbelt can be found here: https://toolbelt.heroku.com 可以在这里找到heroku工具带: https ://toolbelt.heroku.com

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

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