Webhook: full paths for nohup/bash in FPM environment
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -32,7 +32,9 @@ if ($ref !== 'refs/heads/main') {
|
||||
}
|
||||
|
||||
// Fire-and-forget — respond immediately, deploy runs in background
|
||||
$cmd = 'nohup ' . escapeshellarg(DEPLOY_SCRIPT) . ' >> ' . escapeshellarg(LOG_FILE) . ' 2>&1 &';
|
||||
// Use full paths to avoid PATH issues in PHP-FPM minimal environment.
|
||||
$cmd = '/usr/bin/nohup /usr/bin/bash ' . escapeshellarg(DEPLOY_SCRIPT)
|
||||
. ' >> ' . escapeshellarg(LOG_FILE) . ' 2>&1 &';
|
||||
shell_exec($cmd);
|
||||
|
||||
echo json_encode(['ok' => true, 'deploying' => true, 'ref' => $ref]);
|
||||
|
||||
Reference in New Issue
Block a user