-
Create the following folder structure in your root project directory: .ebextensions/supervisor
-
Place the supervisor.config under .ebextensions/
-
Place the setup.sh under .ebextensions/supervisor/
-
Run "chmod +x .ebextensions/supervisor/setup.sh"
-
Place the supervisord.conf under .ebextensions/supervisor/
-
Place the supervisor_laravel.conf under .ebextensions/supervisor/
Feel free to update the files according to your needs. You mostly will need to change the command inside the supervisor_laravel.conf file
If you want to check if the supervisor is running, connect to the instance and run "supervisorctl status". If you want stop/kill supervisor run "ps aux | grep "[/]usr/bin/supervisord", get the PID and then run "kill PID_NUMBER"
Hey guys, just few small changes could solve the issue.
in supervisor_laravel.conf do these changes:
[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command=/usr/bin/php /var/www/html/artisan queue:work --sleep=3 --tries=3 ; /var/www/html/artisan is the default path for your laravel files in elastic beanstalk
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
user=webapp ; webapp is the default user in elastic beanstalk
numprocs=3
redirect_stderr=true
stderr_logfile=/var/log/supervisor_laravel.err.log
stdout_logfile=/var/log/supervisor_laravel.out.log
stopwaitsecs=3600