Skip to content

Commit

Permalink
chore(deploy): adds pm2 restart to deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
rizkyilhampra committed Nov 17, 2024
1 parent 53bf65d commit 0ca5b31
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions deploy.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,18 @@
upload('.env', get('deploy_path').'/shared');
});

task('pm2', function() {
cd('{{release_path}}');
run('pm2 restart pm2-worker.yml');
});

task('deploy', [
'deploy:prepare',
'deploy:secrets',
'deploy:vendors',
'artisan:storage:link',
'artisan:optimize:clear',
'pm2',
'deploy:publish',
]);

Expand Down
4 changes: 4 additions & 0 deletions pm2-worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@ apps:
script: artisan
exec_mode: fork
instances: 1
autorestart: false
cron_restart: "* * * * *"
combine_logs: true
max_memory_restart: "100M"
args:
- schedule:run

0 comments on commit 0ca5b31

Please sign in to comment.