Heroku Cedar应用程序与多个面向Web的进程 [英] Heroku Cedar Application With Multiple Web Facing Processes

查看:120
本文介绍了Heroku Cedar应用程序与多个面向Web的进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以配置 Procfile 以支持多个网络端点(通过端口或子域)?例如:

  web:bundle exec unicorn -p $ PORT -c ./config/unicorn.rb 
admin :bundle exec unicorn -p $ ALT_PORT -c ./config/admin/unicorn.rb


解决只有 web 才会绑定到端口,如果您需要多个web端点,您可以配置多个dns条目以指向相同的应用程序,或者你可以部署多个独立的heroku应用程序。您希望通过使用具有相同应用程序代码的两种不同流程类型并访问我们来获得什么?

更新



我可能对仅为Web进程设置的端口有错误。



您可以运行 $ heroku run bash 然后 $ echo $ PORT ,它看起来像一个被设置。但是我不知道如何将请求路由到这些进程与Web进程之间。

Is it possible to configure a Procfile to support multiple web endpoints (either by port or subdomain)? Something like:

web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb
admin: bundle exec unicorn -p $ALT_PORT -c ./config/admin/unicorn.rb

解决方案

Only the web will get bound to a port, if you need multiple web endpoints you can either configure multiple dns entries to point at the same app, or you can deploy multiple seperate heroku apps. What do you hope to achieve by having two different process types with the same application code and we access?

Update

I may have been wrong about the port only getting set for a web process.

You can run $ heroku run bash and then $ echo $PORT and it looks like one gets set. However I have no idea how requests get routed to those processes versus the web process.

这篇关于Heroku Cedar应用程序与多个面向Web的进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆