Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port handling is confusing when web is not first in Procfile #150

Open
rbclark opened this issue Jul 24, 2018 · 2 comments
Open

Port handling is confusing when web is not first in Procfile #150

rbclark opened this issue Jul 24, 2018 · 2 comments

Comments

@rbclark
Copy link

rbclark commented Jul 24, 2018

In my Procfile I had the following:

release: rake db:migrate
web: bundle exec rails s -p $PORT

I then ran

$ myapp config:get PORT
6000

I found that when my app was scaled to 1, every time I ran systemctl status myapp-web-1 I would get

* Listening on tcp://0.0.0.0:6100

I then changed my Procfile to

web: bundle exec rails s -p $PORT
release: rake db:migrate

And got

* Listening on tcp://0.0.0.0:6000

My question here is how do I go about figuring out what port my app is up and running on so I can point a reverse proxy at it? It seems like changing the order of the Procfile should not cause the port number to jump around like it does.

@crohr
Copy link
Owner

crohr commented Jul 24, 2018 via email

@rbclark
Copy link
Author

rbclark commented Jul 24, 2018

The best thing I can think of is at least having an interface to find out what port a service is running on. The only reason I was able to realize what was happening was due to the fact that I checked systemctl status myservice-web-1 and saw it was coming up on not the port I expected. If I could've said myservice config to view current port bindings for specific services, I believe that would've been pretty helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants