Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
84695ac372 | ||
|
|
3364c8ac23 |
+18
-4
@@ -18,14 +18,14 @@ add('shared_dirs', ['storage']);
|
||||
add('writable_dirs', ['storage', 'bootstrap/cache']);
|
||||
|
||||
// Host Definitions
|
||||
host('main')
|
||||
->set('hostname', 'rsyncstudio.absdev.net')
|
||||
host('prod')
|
||||
->set('hostname', 'rsyncs.absdev.net')
|
||||
->set('remote_user', 'mag')
|
||||
->set('branch', 'main')
|
||||
->set('deploy_path', '/var/www/rsyncstudio');
|
||||
|
||||
host('stage')
|
||||
->set('hostname', 'rsyncstudio.absdev.net')
|
||||
->set('hostname', 'pegasus.absdev.net')
|
||||
->set('remote_user', 'mag')
|
||||
->set('branch', 'stage')
|
||||
->set('deploy_path', '/var/www/rsyncstudio_dev');
|
||||
@@ -50,7 +50,21 @@ task('artisan:clear', function (): void {
|
||||
task('services:restart', function (): void {
|
||||
run('sudo -n nginx -t');
|
||||
run('sudo -n systemctl reload nginx');
|
||||
run('sudo -n systemctl restart php8.3-fpm');
|
||||
$phpFpm = run(<<<'BASH'
|
||||
if systemctl list-unit-files php8.5-fpm.service --no-legend | grep -q '^php8.5-fpm.service'; then
|
||||
echo php8.5-fpm
|
||||
elif systemctl list-unit-files php8.3-fpm.service --no-legend | grep -q '^php8.3-fpm.service'; then
|
||||
echo php8.3-fpm
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
BASH);
|
||||
$phpFpm = trim($phpFpm);
|
||||
if ($phpFpm === '') {
|
||||
throw new \RuntimeException('No supported PHP-FPM service found (8.5 or 8.3).');
|
||||
}
|
||||
writeln("Restarting {$phpFpm}...");
|
||||
run("sudo -n systemctl restart {$phpFpm}");
|
||||
});
|
||||
|
||||
after('deploy:update_code', 'deploy:write_revision_file');
|
||||
|
||||
Reference in New Issue
Block a user