Reputation: 1602
I use heroku web and worker dynos. And now I want to split requests by subdomain or path.
for example
Procfile
web: bundle exec puma -p $PORT ./config/puma
admin-web: bundle exec puma -p $PORT ./config/puma
worker: ...
Is it possible?
Upvotes: 6
Views: 3007
Reputation: 1797
It should be possible by using two Procfiles and the Multi-Procfile Buildpack, one for web
, one for admin-web
. It's described in detail here.
Upvotes: 1
Reputation: 33824
No. You cannot do this. Domains are routed to dynos at the Heroku application level.
If you want to do this, you'll need to create two separate Heroku applications -- or, a much simpler idea: have only one type of web server, and parse the incoming URL. If the URL starts with admin.
, then display content for admins, if the URL starts with www.
, then display non-admin content =)
Upvotes: 3