Finalize Supervisor-owned SSR deployment
This commit is contained in:
@@ -4,9 +4,10 @@
|
||||
; sudo supervisorctl start skinbase-ssr
|
||||
;
|
||||
; Path uses the stable app symlink (REMOTE_FOLDER), not a versioned release dir.
|
||||
; Override node path if needed. Deploy restarts this via SSR_SUPERVISOR_PROGRAM=skinbase-ssr.
|
||||
; Supervisor has a minimal PATH, so call node by absolute path. Deploy restarts
|
||||
; this as the SSH login user via: sudo -n supervisorctl restart skinbase-ssr
|
||||
[program:skinbase-ssr]
|
||||
command=/usr/bin/env node /opt/www/virtual/SkinbaseNova/bootstrap/ssr/ssr.js
|
||||
command=/usr/local/bin/node /opt/www/virtual/SkinbaseNova/bootstrap/ssr/ssr.js
|
||||
directory=/opt/www/virtual/SkinbaseNova
|
||||
process_name=%(program_name)s
|
||||
numprocs=1
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set +e
|
||||
ssh_bin=ssh
|
||||
remote_server=[email protected]
|
||||
key=/tmp/skinbase-deploy-ssh/identities/id_ed25519
|
||||
opts=(-o BatchMode=yes -o StrictHostKeyChecking=accept-new -o ConnectTimeout=15 -o IdentitiesOnly=yes)
|
||||
if [[ -S /tmp/skinbase-deploy-ssh/mux-klevze_server3.klevze.si.sock ]]; then
|
||||
opts+=(-o ControlPath=/tmp/skinbase-deploy-ssh/mux-klevze_server3.klevze.si.sock)
|
||||
fi
|
||||
if [[ -f "$key" ]]; then
|
||||
opts+=(-i "$key")
|
||||
fi
|
||||
|
||||
"$ssh_bin" "${opts[@]}" "$remote_server" 'sudo -n -l'
|
||||
echo EXIT:$?
|
||||
echo '--- ps ---'
|
||||
"$ssh_bin" "${opts[@]}" "$remote_server" "ps -ef | grep -E 'ssr|inertia|supervisor' | grep -v grep"
|
||||
echo '--- status ---'
|
||||
"$ssh_bin" "${opts[@]}" "$remote_server" 'sudo -n /usr/bin/supervisorctl status'
|
||||
echo '--- restart ---'
|
||||
"$ssh_bin" "${opts[@]}" "$remote_server" 'sudo -n /usr/bin/supervisorctl restart skinbase-ssr; echo rc=$?'
|
||||
Reference in New Issue
Block a user