Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can a Heroku app use different/multiple ports?

Web services on Heroku normally use the PORT environment variable, but I want to run a custom mail server on Heroku. So I need to expose 2 ports, preferably 110 and 25, but I can live with alternatives. Is it possible?

like image 217
Pepijn Avatar asked Nov 12 '11 21:11

Pepijn


People also ask

How to deploy a repository to multiple Heroku apps?

There are just two extra steps you need to do to set up a repo to deploy to multiple Heroku apps. Step 1. Add and/or Rename Your Heroku Remotes If you create a heroku app via their CLI using heroku create a remote called heroku will be automatically created for you in your git settings.

What is the default port for Heroku?

Heroku expects a web application to bind its HTTP server to the port defined by the $PORT environment variable. Many frameworks default to port 8080, but can be configured to use an environment variable instead.

What is Heroku and how does it work?

Heroku provides helpful tools (namely pipelines, Heroku CI, and review apps) for creating and maintaining your app’s staging and test environments. Let’s say you have an application running on your local (development) machine and you’re ready to push it to Heroku.

How do I run a Heroku process from a Git remote?

The web process type is special as it’s the only process type that will receive HTTP traffic from Heroku’s routers. Other process types can be named arbitrarily. from the Heroku documentation. 1. Create one dyno for each app (workspace) you want to run Create one named Heroku app per web app using the Heroku CLI and bind it a Git remote.


2 Answers

No, just running some quick tests against the heroku proxy (proxy.heroku.com) I can only make connections to ports 80 and 443. Being as heroku don't provide any POP/SMTP it doesn't make sense for them to have those ports open I'm afraid.

like image 136
John Beynon Avatar answered Oct 20 '22 23:10

John Beynon


Dotcloud allows this: https://github.com/pepijndevos/Twemail

like image 1
Pepijn Avatar answered Oct 21 '22 01:10

Pepijn