diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2018-09-12 20:23:39 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2018-09-12 20:23:39 +0200 |
commit | cd1e70a3bced0c911477c7b65fdea0734d360fcd (patch) | |
tree | e5480c47941a9bf81b9303ea924c64bd63f8d0ba /config | |
parent | 9f580b3be6e2d6af8a057fea0b2318468fd770c3 (diff) | |
download | norsk-urskog-registrations-cd1e70a3bced0c911477c7b65fdea0734d360fcd.tar.gz norsk-urskog-registrations-cd1e70a3bced0c911477c7b65fdea0734d360fcd.tar.bz2 norsk-urskog-registrations-cd1e70a3bced0c911477c7b65fdea0734d360fcd.zip |
Fixup prod/dev logic in puma config.
Diffstat (limited to 'config')
-rw-r--r-- | config/puma.rb | 10 |
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 === |