This makes it so that it will tries to use the defaults given by Rails when user doesn't have listen configuration in their unicorn.rb.
Before this patch:
=> No listen in config/unicorn.rb
$ rails server
=> Booting Unicorn
=> Rails 4.1.5 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
I, [2014-09-02T22:06:46.940472 #66762] INFO -- : listening on addr=0.0.0.0:8080 fd=11
$ rails server -p 3001
=> Booting Unicorn
=> Rails 4.1.5 application starting in development on http://0.0.0.0:3001
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
I, [2014-09-02T22:06:46.940472 #66762] INFO -- : listening on addr=0.0.0.0:8080 fd=11
=> With listen 5000 in config/unicorn.rb
$ rails server
=> Booting Unicorn
=> Rails 4.1.5 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
I, [2014-09-02T22:06:46.940472 #66762] INFO -- : listening on addr=0.0.0.0:5000 fd=11
$ rails server -p 3001
=> Booting Unicorn
=> Rails 4.1.5 application starting in development on http://0.0.0.0:3001
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
I, [2014-09-02T22:06:46.940472 #66762] INFO -- : listening on addr=0.0.0.0:5000 fd=11
After this patch:
=> No listen in config/unicorn.rb
$ rails server
=> Booting Unicorn
=> Rails 4.1.5 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
I, [2014-09-02T22:06:46.940472 #66762] INFO -- : listening on addr=0.0.0.0:3000 fd=11
$ rails server -p 3001
=> Booting Unicorn
=> Rails 4.1.5 application starting in development on http://0.0.0.0:3001
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
I, [2014-09-02T22:06:46.940472 #66762] INFO -- : listening on addr=0.0.0.0:3001 fd=11
=> With listen 5000 in config/unicorn.rb
$ rails server
=> Booting Unicorn
=> Rails 4.1.5 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
I, [2014-09-02T22:06:46.940472 #66762] INFO -- : listening on addr=0.0.0.0:5000 fd=11
$ rails server -p 3001
=> Booting Unicorn
=> Rails 4.1.5 application starting in development on http://0.0.0.0:3001
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
I, [2014-09-02T22:06:46.940472 #66762] INFO -- : listening on addr=0.0.0.0:5000 fd=11
Note that it might looks weird for the last case, but that's an expected outcome given user overrides config/unicorn.rb themselves.
This makes it so that it will tries to use the defaults given by Rails when user doesn't have
listen
configuration in theirunicorn.rb
.Before this patch:
=> No
listen
inconfig/unicorn.rb
=> With
listen 5000
inconfig/unicorn.rb
After this patch:
=> No
listen
inconfig/unicorn.rb
=> With
listen 5000
inconfig/unicorn.rb
Note that it might looks weird for the last case, but that's an expected outcome given user overrides
config/unicorn.rb
themselves.Fixes #9