foreman and user fixes

This commit is contained in:
f 2022-03-07 16:20:16 -03:00
parent e5a40d941c
commit efbae9d84e

View file

@ -3,9 +3,9 @@ set -e
case $1 in case $1 in
start) start)
su app -c "cd /srv && foreman run -f /etc/Procfile install" su rails -c "foreman run -f /etc/Procfile -d /srv install"
su app -c "cd /srv && foreman run -f /etc/Procfile migrate" su rails -c "foreman run -f /etc/Procfile -d /srv migrate"
daemonize -c /srv -u app /usr/bin/foreman start -f /etc/Procfile rails daemonize -c /srv -u rails /usr/bin/foreman start -f /etc/Procfile -d /srv rails
;; ;;
stop) stop)
@ -13,7 +13,7 @@ case $1 in
;; ;;
reload) reload)
su app -c "cd /srv && foreman run -f /etc/Procfile install" su rails -c "foreman run -f /etc/Procfile -d /srv install"
cat /srv/tmp/puma.pid | xargs -r kill -USR2 cat /srv/tmp/puma.pid | xargs -r kill -USR2
;; ;;
@ -23,8 +23,8 @@ case $1 in
daemonize -c /srv \ daemonize -c /srv \
-p /tmp/prometheus.pid \ -p /tmp/prometheus.pid \
-l /tmp/prometheus.pid \ -l /tmp/prometheus.pid \
-u app \ -u rails \
/usr/bin/foreman start -f /etc/Procfile prometheus /usr/bin/foreman start -f /etc/Procfile -d /srv prometheus
;; ;;
prometheus-stop) prometheus-stop)
@ -34,7 +34,7 @@ case $1 in
blazer) blazer)
test -z "$2" || schedule="_${2}" test -z "$2" || schedule="_${2}"
su app -c "cd /srv && foreman run -f /etc/Procfile blazer${schedule}" su rails -c "foreman run -f /etc/Procfile -d /srv blazer${schedule}"
;; ;;
esac esac