diff --git a/config/puma.rb b/config/puma.rb index 088d709485919f1e58adba90a35f00f05f3c17dc..9642a0d7ded117cf53d4aee0fae656b9bab7eb95 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -7,8 +7,6 @@ threads 1, 6 app_dir = File.expand_path("../..", __FILE__) shared_dir = "#{app_dir}/shared" -daemonize - # Default to production rails_env = ENV['RAILS_ENV'] || "production" environment rails_env diff --git a/portalmec.service b/portalmec.service index 60f49df81a3dc2be7378a0bc39cb9fc832ae7bfa..ed539a61d6c1a25e32427ced4775e225b33ae12c 100644 --- a/portalmec.service +++ b/portalmec.service @@ -3,10 +3,8 @@ Description=Control puma for portalmec After=nginx.service [Service] -Type=simple ExecStart=/portalmec/puma.sh start ExecStop=/portalmec/puma.sh stop -Restart=always [Install] WantedBy=multi-user.target diff --git a/puma.sh b/puma.sh index e02e69804ff83d007b73ce8225b02bcb5c6931b6..2baa709eed089d4c08061a55e8d642c616f7d587 100644 --- a/puma.sh +++ b/puma.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash source /home/.rvm/scripts/rvm export PUMA_APP_DIR=/portalmec