Skip to content

Commit

Permalink
bind puma to socket in production
Browse files Browse the repository at this point in the history
  • Loading branch information
vol1ura committed Jan 14, 2024
1 parent e9121ad commit 60fd039
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions config/puma.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@
# Specifies the `worker_timeout` threshold that Puma will use to wait before
# terminating a worker in development environments.
#
worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development"

# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
#
port ENV.fetch("PORT") { 3000 }
if ENV.fetch("RAILS_ENV", "development") == "development"
worker_timeout 3600
# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
port ENV.fetch("PORT") { 3000 }
else
bind "unix://#{ENV.fetch('APP_DEPLOY_PATH')}/shared/tmp/sockets/s95-puma.sock"
end

# Specifies the `environment` that Puma will run in.
#
Expand Down

0 comments on commit 60fd039

Please # to comment.