diff --git a/config/puma.rb.distr b/config/puma.rb.distr index 4fdc588..f940947 100644 --- a/config/puma.rb.distr +++ b/config/puma.rb.distr @@ -78,7 +78,7 @@ stdout_redirect '/var/log/oms/puma.stdout', '/var/log/oms/puma.stderr', true # bind 'unix:///var/run/puma.sock' # bind 'unix:///var/run/puma.sock?umask=0111' # bind 'ssl://127.0.0.1:9292?key=path_to_key&cert=path_to_cert' -bind 'tcp://127.0.0.1:3000' +bind 'unix:///var/run/oms/socket' # Instead of "bind 'ssl://127.0.0.1:9292?key=path_to_key&cert=path_to_cert'" you # can also use the "ssl_bind" option. diff --git a/debian/onat-management-system.service b/debian/onat-management-system.service index 1e9bfc1..e10a206 100644 --- a/debian/onat-management-system.service +++ b/debian/onat-management-system.service @@ -7,15 +7,19 @@ WantedBy=multi-user.target [Service] Type=forking PIDFile=/var/run/oms/oms.pid -#WorkingDirectory=/opt/oms +WorkingDirectory=/opt/oms RuntimeDirectory=oms -User=oms +#User=oms LimitNOFILE=65536 LimitCORE=infinity Environment=PATH=/usr/bin:/opt/oms/vendor/bundler/bin:$PATH EnvironmentFile=/etc/oms/environment Environment=BUNDLE_GEMFILE=/opt/oms/Gemfile Environment=GEM_HOME=/opt/oms/vendor/bundle +Environment=RAILS_ENV=production Environment=GEM_PATH=/opt/oms/vendor/bundler:/opt/oms/vendor/bundle -ExecStart=/usr/bin/ruby /opt/oms/vendor/bundler/bin/bundle exec puma -C /etc/oms/puma.rb +ExecStart=/usr/bin/ruby /opt/oms/vendor/bundler/bin/bundle exec puma -C /etc/oms/puma.rb --daemon +ExecStop=/usr/bin/ruby /opt/oms/vendor/bundler/bin/bundle exec pumactl -S /var/run/oms/puma.state stop + Restart=on-abnormal +