Diagnostic: find node binary path and working directory from running process
Some checks failed
Deploy / tag-deploy (push) Has been cancelled
Deploy / deploy-frontend (push) Has been cancelled
Deploy / detect (push) Successful in 4s
Deploy / deploy-api (push) Failing after 28s

This commit is contained in:
DaX
2026-03-05 01:59:18 +01:00
parent 93df263214
commit b24a1fea27

View File

@@ -145,7 +145,7 @@ jobs:
if: needs.detect.outputs.migrations == 'true'
run: |
cat > /tmp/migrate-params.json << 'PARAMS'
{"commands":["systemctl list-units --type=service --state=running 2>/dev/null | grep -iE 'node|api|docker|filament' || echo 'no matching services'","docker ps 2>/dev/null || echo 'docker not running or not installed'","ls -la /home/ubuntu/ 2>/dev/null || echo 'no /home/ubuntu'","ls -la /home/ec2-user/ 2>/dev/null || echo 'no /home/ec2-user'","ps aux | grep -i node || echo 'no node processes'","cat /etc/os-release | head -5"]}
{"commands":["NODE_PID=$(pgrep -f 'node server.js' | head -1) && echo Node PID: $NODE_PID && ls -la /proc/$NODE_PID/exe && ls -la /proc/$NODE_PID/cwd && cat /proc/$NODE_PID/environ | tr '\\0' '\\n' | grep -E 'PATH|HOME|NODE' || echo 'no node process found'","systemctl cat node-api 2>/dev/null || systemctl list-units --type=service | grep -i node || echo 'no node service'","ls -la /home/ec2-user/*.js /home/ec2-user/*.json 2>/dev/null || echo 'no js in ec2-user home'"]}
PARAMS
CMD_ID=$(aws ssm send-command \
--region $AWS_REGION \