added support for legacy tickets, fixed switching of modes and also style updates
tests / ci (push) Canceled after 0s

This commit is contained in:
Mark Gregory
2026-10-14 09:47:10 +01:00
parent 2f422a5320
commit fe68238143
+23 -3
View File
@@ -29,10 +29,10 @@ host('develop')
->set('deploy_path', '/var/www/helpdesk_dev');
host('mpba')
->set('hostname', 'helpdesk.mpba.dev')
->set('hostname', 'sirius.absdev.net')
->set('remote_user', 'mag')
->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,
@@ -86,9 +86,29 @@ task('artisan:clear', function (): void {
});
task('services:restart', function (): void {
// Validate and reload nginx.
run('sudo -n nginx -t');
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');