如何在heroku上部署dockerised golang web服务?

时间:2018-02-23 04:24:57

标签: docker go

请在我的heroku容器上找到logs

2018-02-23T04:18:38.227618+00:00 app[web.1]: + exec app
2018-02-23T04:18:38.238070+00:00 app[web.1]: GRPC:2018/02/23 04:18:38 Starting server...
2018-02-23T04:19:35.943530+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2018-02-23T04:19:35.943530+00:00 heroku[web.1]: Stopping process with SIGKILL
2018-02-23T04:19:36.048633+00:00 heroku[web.1]: Process exited with status 137
2018-02-23T04:19:36.058234+00:00 heroku[web.1]: State changed from starting to crashed

我无法将我的应用绑定到端口。我的Dockerfile指定" EXPOSE 9090"我的服务器在端口9090上运行。我也尝试使用os.Getenv("PORT"),但没有运气。

0 个答案:

没有答案