-
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"
Question about this three lines in setup.sh (31,32,33):
Why does all three start with
. /opt/elasticbeanstalk/deployment/env &&
?I suppose they try to load the environment variables, but for what purpose? Is it neccessary?
It's throwing me an error (bash: shell: command not found) and I've removed that part (now all three start at
cat ...
) and works fine.