summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/puma.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/config/puma.rb b/config/puma.rb
index 62073b5..cd7089a 100644
--- a/config/puma.rb
+++ b/config/puma.rb
@@ -1,9 +1,11 @@
#!/usr/bin/env puma
-if get(:environment) == "production"
+if @config.environment.call == "production"
root = "../../shared"
+ socket = "unix://../../shared/tmp/sockets/puma.sock"
else
root = "."
+ socket = "tcp://localhost:3000"
end
# Store the pid of the server in the file at “path”.
@@ -22,11 +24,7 @@ state_path "#{root}/tmp/pids/puma.state"
stdout_redirect "#{root}/log/puma.stdout.log",
"#{root}/log/puma.stderr.log"
-if get(:environment) == "production"
- bind "unix://../../shared/tmp/sockets/puma.sock"
-else
- bind "tcp://localhost:3000"
-end
+bind socket
# === Cluster mode ===