Add os gem

This commit is contained in:
Ari Timonen 2021-08-05 19:59:41 +03:00
parent 6e6bfe507d
commit 8326a49ccb
3 changed files with 8 additions and 2 deletions

View file

@ -21,6 +21,7 @@ gem 'connection_pool' # Needed for MT
# Web server
gem 'faraday'
gem 'puma'
gem 'os'
# gem 'unicorn'
# Model plugins

View file

@ -529,6 +529,7 @@ DEPENDENCIES
omniauth
omniauth-rails_csrf_protection
omniauth-steam
os
phantomjs
poltergeist
pry-byebug
@ -571,4 +572,4 @@ RUBY VERSION
ruby 2.6.5p114
BUNDLED WITH
2.1.4
2.2.6

View file

@ -1,5 +1,6 @@
# Load dev vars. These are loaded in application but puma needs them too.
require "dotenv"
require 'os'
Dotenv.load('.env.' + ENV['RAILS_ENV'] + '.local', '.env.local', '.env.' + ENV['RAILS_ENV'], '.env')
tag 'ENSL'
@ -19,7 +20,10 @@ app_dir = ENV['APP_PATH'] || '/var/www'
# Set basic puma settings
environment rails_env
bind "unix://#{app_dir}/tmp/sockets/puma.#{rails_env}.sock"
#if OS.posix?
# bind "unix://#{app_dir}/tmp/sockets/puma.#{rails_env}.sock"
#end
port Integer(ENV['PUMA_PORT'] || 4000)
# Redirect stdout only in production. Dev mode needs it for debug