docker - 将现有 heroku 应用程序的堆栈从 heroku-18 设置为 Docker 镜像的 'container'?

标签 docker heroku plotly-dash

我正在尝试找到一种将堆栈设置为“容器”的方法,以便我可以将我的应用程序部署在 docker 镜像而不是 heroku-18 中。这样做的原因很复杂,但却是必要的。

Heroku Docker image setup docs说我可以在我的 app.json 中做到这一点文件,像这样:
"stack": "container"
但是这样做会导致通过在线界面部署时出错:

 !     No default language could be detected for this app.
            HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically.
            See https://devcenter.heroku.com/articles/buildpacks
 !     Push failed

有没有其他方法可以设置stackcontainer ?例如,根据 these docs也可以使用 Dockerfile 进行设置,但目前尚不清楚如何做到这一点。

我知道我可以使用 heroku CLI,但我更愿意在我的 git repo 中设置它,因为这个应用程序也将部署给其他用户。

提前感谢您的任何建议!

最佳答案

将堆栈设置为 container使用命令行(作为编辑 app.json 的替代方法),我相信

heroku stack:set container

会做的伎俩。您可以在此处阅读有关在 Heroku 上部署容器的更多信息(有关上述语法,请参阅入门的第 3 步):

https://devcenter.heroku.com/articles/build-docker-images-heroku-yml

关于docker - 将现有 heroku 应用程序的堆栈从 heroku-18 设置为 Docker 镜像的 'container'?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59725708/

相关文章:

python - 阴谋冲刺 : Download getting triggered automatically after removing element

python - 从 Raspberry PI 运行时不显示 Dash/Plotly 图表

Docker 图像推送到谷歌容器注册表不起作用

maven - 使用 dockerfile-maven-plugin 标记创建的图像

python - Docker 进程被神秘的 `Killed` 消息杀死

heroku - 如何将 TK 域指向 heroku 应用程序?

python - 在 Dash App 中调用本地 CSS 文件

docker - 部署 docker-compose 容器

ruby-on-rails - Heroku 环境中无法解释的高响应时间

ruby-on-rails - zsh:将 AWS key 添加为环境变量时解析 `\n' 附近的错误