diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2018-09-13 13:42:08 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2018-09-13 13:42:08 +0200 |
commit | 0b1e5b577b92d5956dc9b71bde2570b7410804a4 (patch) | |
tree | f4752c2adc65e374a2bdf05cebc2251ff5aa431b /config | |
parent | 026cfd87d0539a1273766674a3c76c17052f5fa2 (diff) | |
download | norsk-urskog-registrations-0b1e5b577b92d5956dc9b71bde2570b7410804a4.tar.gz norsk-urskog-registrations-0b1e5b577b92d5956dc9b71bde2570b7410804a4.tar.bz2 norsk-urskog-registrations-0b1e5b577b92d5956dc9b71bde2570b7410804a4.zip |
Fixup prod/dev logic in puma config, properly this time.
Diffstat (limited to 'config')
-rw-r--r-- | config/puma.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/config/puma.rb b/config/puma.rb index cd7089a..619ee43 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -1,13 +1,15 @@ #!/usr/bin/env puma -if @config.environment.call == "production" - root = "../../shared" - socket = "unix://../../shared/tmp/sockets/puma.sock" +if @config.environment_str == "production" + root = File.expand_path('../', __FILE__) + socket = "unix://#{root}/tmp/sockets/puma.sock" else root = "." socket = "tcp://localhost:3000" end +puts "Root: #{root}" + # Store the pid of the server in the file at “path”. # pidfile "#{root}/tmp/pids/puma.pid" |