I have a rails app with puma deployed on heroku. Everything seems to be fine except if I start my app in dev env the port is 5000 instead of 3000.
Why is this happening? According to my config file it should fall back to 3000 like just the thread and concurrency numbers (those work fine).
Procfile.dev
web: bundle exec puma -C config/puma.rb
config/puma.rb
workers Integer(ENV['WEB_CONCURRENCY'] || 2)
threads_count = Integer(ENV['MAX_THREADS'] || 5)
threads threads_count, threads_count
preload_app!
rackup DefaultRackup
port ENV['PORT'] || 3000
environment ENV['RACK_ENV'] || 'development'
on_worker_boot do
ActiveRecord::Base.establish_connection
end
After starting server with foreman start -f Procfile.dev
12:36:51 web.1 | [12816] Puma starting in cluster mode...
12:36:51 web.1 | [12816] * Version 2.13.4 (ruby 2.2.3-p173), codename: A Midsummer Code's Dream
12:36:51 web.1 | [12816] * Min threads: 5, max threads: 5
12:36:51 web.1 | [12816] * Environment: development
12:36:51 web.1 | [12816] * Process workers: 2
12:36:51 web.1 | [12816] * Preloading application
12:37:08 web.1 | [12816] * Listening on tcp://0.0.0.0:5000
12:37:08 web.1 | [12816] ! WARNING: Detected 1 Thread(s) started in app boot:
12:37:08 web.1 | [12816] ! #<Rack::MiniProfiler::FileStore::CacheCleanupThread:0x007f860f8fa628@/Users/Silo/.rvm/gems/ruby-2.2.3/gems/rack-mini-profiler-0.9.8/lib/mini_profiler/storage/file_store.rb:53 sleep> - /Users/Silo/.rvm/gems/ruby-2.2.3/gems/rack-mini-profiler-0.9.8/lib/mini_profiler/storage/file_store.rb:71:in `sleep'
12:37:08 web.1 | [12816] Use Ctrl-C to stop
12:37:08 web.1 | [12816] - Worker 0 (pid: 12822) booted, phase: 0
12:37:08 web.1 | [12816] - Worker 1 (pid: 12823) booted, phase: 0