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

Document $PORT and $PS #562

Merged
merged 2 commits into from Apr 23, 2016
Merged

Document $PORT and $PS #562

merged 2 commits into from Apr 23, 2016

Conversation

mike-burns
Copy link
Contributor

Update the ronn documentation to explain that $PORT and $PS exist and
that $PORT starts as the base port number and is incremented on each
line.

Update the ronn documentation to explain that $PORT and $PS exist and
that $PORT starts as the base port number and is incremented on each
line.
My prior explanation did not take `-c` into account.
@mike-burns
Copy link
Contributor Author

Hey @ddollar, just a polite nudge about this.

@mike-burns
Copy link
Contributor Author

Ping @ddollar . Anything to know that you've seen this is welcome.

@mike-burns
Copy link
Contributor Author

@ddollar is this repo still used?

@ddollar ddollar merged commit 0f57247 into ddollar:master Apr 23, 2016
@ddollar
Copy link
Owner

ddollar commented Apr 23, 2016

Thanks!

@gorenje
Copy link

gorenje commented Dec 17, 2017

Hi @ddollar,

I've been happily using foreman for a long time now but what is the rationale behind adding 100 to the port for each line in a Procfile?

I just discovered this by having this strange effect:

prompt> PORT=1234 foreman start web
....
stdout> web.1    | [42390] * Listening on tcp://0.0.0.0:1334

i.e. PORT value was strangely 100 higher than I intended.

This was my Procfile:

worker: bundle exec sidekiq -C config/sidekiq.yml -r ./application.rb
web: bundle exec puma -p ${PORT:-8080} -C config/puma.rb

i.e. web process on line 2, not the first line.

So in order to get the right port, I had to define the web process on the first line of my Procfile:

PORT=1234 foreman start web
....
web.1    | [43088] * Listening on tcp://0.0.0.0:1234

(Having swapped the two lines of my Procfile.)

This is incredibly subtle. I don't understand how the PORT variable can vary according to line on which something is defined in the Procfile.

I guess this is covering PORT number overlapping when starting multiple services in a single Procfile. But I would have assumed this would be an application responsibility, i.e. the application decides what to do if an PORT is taken and not foremans concern.

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

Successfully merging this pull request may close these issues.

None yet

3 participants