Skip to content

Instantly share code, notes, and snippets.

@budasuyasa
Created July 17, 2021 03:45
Show Gist options
  • Save budasuyasa/114bfe8137da7a5d4d8fc7496a197775 to your computer and use it in GitHub Desktop.
Save budasuyasa/114bfe8137da7a5d4d8fc7496a197775 to your computer and use it in GitHub Desktop.
supervisord.d
[program:php-fpm]
process_name=%(program_name)s_%(process_num)02d
command=php-fpm
autostart=true
autorestart=true
numprocs=8
user=www-data
stdout_logfile=/var/log/supervisor/php-fpm-stdout.log
stderr_logfile=/var/log/supervisor/php-fpm-stderr.log
redirect_stderr=true
[program:laravel-scheduler]
process_name=%(program_name)s_%(process_num)02d
command=/bin/sh -c "while [ true ]; do (php /var/www/artisan schedule:run --verbose --no-interaction &); sleep 60; done"
autostart=true
autorestart=true
numprocs=1
user=www-data
redirect_stderr=true
stdout_logfile=/var/log/supervisor/laravel-scheduller-stdout.log
stderr_logfile=/var/log/supervisor/laravel-scheduller-stderr.log
[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/artisan queue:work --sleep=3 --tries=3
autostart=true
startsecs = 0
autorestart=true
numprocs=8
user=www-data
stdout_logfile=/var/log/supervisor/laravel-worker-stdout.log
stderr_logfile=/var/log/supervisor/laravel-worker-stderr.log
redirect_stderr=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment