From efbae9d84eb5fc933cc2ed0e8cbfd7f6310a73f6 Mon Sep 17 00:00:00 2001 From: f Date: Mon, 7 Mar 2022 16:20:16 -0300 Subject: [PATCH] foreman and user fixes --- entrypoint.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 49c1c24..aad8eea 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -3,9 +3,9 @@ set -e case $1 in start) - su app -c "cd /srv && foreman run -f /etc/Procfile install" - su app -c "cd /srv && foreman run -f /etc/Procfile migrate" - daemonize -c /srv -u app /usr/bin/foreman start -f /etc/Procfile rails + su rails -c "foreman run -f /etc/Procfile -d /srv install" + su rails -c "foreman run -f /etc/Procfile -d /srv migrate" + daemonize -c /srv -u rails /usr/bin/foreman start -f /etc/Procfile -d /srv rails ;; stop) @@ -13,7 +13,7 @@ case $1 in ;; 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 ;; @@ -23,8 +23,8 @@ case $1 in daemonize -c /srv \ -p /tmp/prometheus.pid \ -l /tmp/prometheus.pid \ - -u app \ - /usr/bin/foreman start -f /etc/Procfile prometheus + -u rails \ + /usr/bin/foreman start -f /etc/Procfile -d /srv prometheus ;; prometheus-stop) @@ -34,7 +34,7 @@ case $1 in blazer) 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