-
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"
@johnyvelho Hi
I have done the steps you mentioned i got the laravel-worker running in the background, but the problem is the worker doesn't process jobs.
[program:laravel-worker]
command=php artisan queue:work
directory=/var/app/current
stdout_logfile=/var/app/current/storage/logs/laravel-queue.log
logfile_maxbytes=0
logfile_backups=0
redirect_stderr=true
user=webapp
autostart=true
autorestart=true
startretries=86400
edit :
when i logged into the instance and restarted supervisord manually, it worked, so i created a postdeploy hook that restart the process after deployment, log file was created and queue is processing.