fix: run staging diagnostics through sudo
Diagnose rectification request (temporary) / diagnose (push) Failing after 8s

This commit is contained in:
Jesse_Chen
2026-08-27 18:41:10 +08:00
parent 6f809ce116
commit 1dcba7c9f4
@@ -38,7 +38,7 @@ jobs:
ssh-keygen -y -f "$key_path" >/dev/null
ssh_options=(-i "$key_path" -p "$DEPLOY_PORT" -o BatchMode=yes -o IdentitiesOnly=yes -o StrictHostKeyChecking=yes -o "UserKnownHostsFile=$known_hosts_path")
remote="$DEPLOY_USER@$DEPLOY_HOST"
ssh "${ssh_options[@]}" "$remote" "cd '$DEPLOY_PATH' && sudo -n docker compose -p jyotisha-staging -f deploy/docker-compose.postgres.yml exec -T postgres psql -X -v ON_ERROR_STOP=1 -U postgres -d jyotisha -v request_hash='$REQUEST_HASH' -v case_hash='$CASE_HASH'" <<'SQL'
ssh "${ssh_options[@]}" "$remote" "sudo -n docker compose --project-directory '$DEPLOY_PATH' -p jyotisha-staging -f '$DEPLOY_PATH/deploy/docker-compose.postgres.yml' exec -T postgres psql -X -v ON_ERROR_STOP=1 -U postgres -d jyotisha -v request_hash='$REQUEST_HASH' -v case_hash='$CASE_HASH'" <<'SQL'
\pset tuples_only on
\pset format unaligned
\echo TURN