-
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"
Thank you for this gist. I created an example repository and updated it with the supervisor why its focus on symfony application it has the common things in it adjustments on vhosts, cronjobs, supervisor, migration tasks which can be used as example for every PHP application:
https://github.com/alexander-schranz/AWS-Elastic-Beanstalk-PHP-Symfony-Example
PS: I ahad to remove all
. /opt/elasticbeanstalk/deployment/env
else it did throw strange erros with mycomposer_options
.