使用 heroku 时如何在 Heroku 中编辑 Procfile war:deploy myapp.war

How to edit Procfile in Heroku when using heroku war:deploy myapp.war

我正在尝试在 Heroku 中编辑 Procfile,但是当您使用命令 heroku war:deploy myapp.war 部署 war 文件时,您似乎无法编辑它.关于我如何编辑这个或 运行 另一个 shell 脚本在网络阶段的任何建议?

我尝试使用 --include 直接包含 Procfile,但是它被 Heroku 提供的默认 Procfile 覆盖。

heroku war:deploy 不支持自定义 Procfile。但是,您可以使用以下配置变量自定义命令:

  • JAVA_OPTS
  • WEBAPP_RUNNER_OPTS

您可以使用 heroku config:set WEBAPP_RUNNER_OPTS="..."

这样的命令进行设置