added support for legacy tickets, fixed switching of modes and also style updates
tests / ci (push) Canceled after 0s
tests / ci (push) Canceled after 0s
This commit is contained in:
+23
-3
@@ -29,10 +29,10 @@ host('develop')
|
|||||||
->set('deploy_path', '/var/www/helpdesk_dev');
|
->set('deploy_path', '/var/www/helpdesk_dev');
|
||||||
|
|
||||||
host('mpba')
|
host('mpba')
|
||||||
->set('hostname', 'helpdesk.mpba.dev')
|
->set('hostname', 'sirius.absdev.net')
|
||||||
->set('remote_user', 'mag')
|
->set('remote_user', 'mag')
|
||||||
->set('branch', 'main')
|
->set('branch', 'main')
|
||||||
->set('deploy_path', '/var/www/helpdesk_mpba');
|
->set('deploy_path', '/var/www/helpdesk');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Install the root npm tree, then every module that owns its own lock file,
|
* Install the root npm tree, then every module that owns its own lock file,
|
||||||
@@ -86,9 +86,29 @@ task('artisan:clear', function (): void {
|
|||||||
});
|
});
|
||||||
|
|
||||||
task('services:restart', function (): void {
|
task('services:restart', function (): void {
|
||||||
|
// Validate and reload nginx.
|
||||||
run('sudo -n nginx -t');
|
run('sudo -n nginx -t');
|
||||||
run('sudo -n systemctl reload nginx');
|
run('sudo -n systemctl reload nginx');
|
||||||
run('sudo -n systemctl restart php8.3-fpm');
|
|
||||||
|
// Detect the PHP-FPM socket configured in nginx.
|
||||||
|
$socket = trim(run(
|
||||||
|
"sudo -n nginx -T 2>/dev/null"
|
||||||
|
. " | grep -oE 'php[0-9]+\\.[0-9]+-fpm\\.sock'"
|
||||||
|
. " | sort -Vu"
|
||||||
|
. " | tail -n 1"
|
||||||
|
));
|
||||||
|
|
||||||
|
if ($socket === '') {
|
||||||
|
throw new \RuntimeException(
|
||||||
|
'Unable to detect the PHP-FPM version from nginx configuration.'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
// Convert php8.5-fpm.sock into php8.5-fpm.
|
||||||
|
$service = str_replace('.sock', '', $socket);
|
||||||
|
writeln("<info>Detected PHP-FPM service: {$service}</info>");
|
||||||
|
// Restart the detected PHP-FPM service.
|
||||||
|
run("sudo -n systemctl restart {$service}");
|
||||||
|
writeln("<info>PHP-FPM restarted successfully.</info>");
|
||||||
});
|
});
|
||||||
|
|
||||||
after('deploy:update_code', 'deploy:write_revision_file');
|
after('deploy:update_code', 'deploy:write_revision_file');
|
||||||
|
|||||||
Reference in New Issue
Block a user