diff --git a/Procfile b/Procfile index 5185bd8..9ff2419 100644 --- a/Procfile +++ b/Procfile @@ -1,3 +1,4 @@ web: bundle exec puma -C config/puma.rb +cable: bundle exec puma -p 28080 cable/config.ru release: ./bin/rails db:migrate diff --git a/config/cable.ru b/config/cable.ru new file mode 100644 index 0000000..a8927fd --- /dev/null +++ b/config/cable.ru @@ -0,0 +1,6 @@ +# cable/config.ru +require_relative "../config/environment" +Rails.application.eager_load! + +run ActionCable.server + diff --git a/config/environments/production.rb b/config/environments/production.rb index 8f76985..ada3806 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -41,13 +41,8 @@ config.active_storage.service = :local # Mount Action Cable outside main process or domain. - config.action_cable.mount_path = "/cable" - config.action_cable.url = ENV["HEROKU_ENV"] == "staging" ? - ( - "wss://socket.staging.nomadstation.io/" - ) : ( - "wss://socket.nomadstation.io/" - ) + config.action_cable.mount_path = nil + config.action_cable.url = ENV.fetch("REDIS_URL") # config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ] # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.