commands: 11install_supervisor: test : '[ ! /etc/supervisor ] && echo "supervisor not installed"' command: "easy_install supervisor" container_commands: 14insert_supervisor_main_config: command: ". /opt/elasticbeanstalk/support/envvars && cat .ebextensions/supervisor/supervisord.conf > /etc/supervisor/supervisord.conf" leader_only: true 15insert_supervisor_main_config_to_etc: command: ". /opt/elasticbeanstalk/support/envvars && cat .ebextensions/supervisor/supervisord.conf > /etc/supervisord.conf" leader_only: true 16insert_data_import_supervisor_config: command: ". /opt/elasticbeanstalk/support/envvars && cat .ebextensions/supervisor/data_import_consumer.conf > /etc/supervisor/conf.d/data_import_consumer.conf" leader_only: true files: "/opt/elasticbeanstalk/hooks/appdeploy/post/490-supervisor_install.sh": mode: "000755" owner: root group: root content: | #!/usr/bin/env bash . /opt/elasticbeanstalk/support/envvars if [ ! -f /usr/local/bin/supervisord ]; then echo "install supervisor and create directories" easy_install supervisor else echo "supervisor already installed" fi if [ ! -d /etc/supervisor ]; then mkdir /etc/supervisor echo "create supervisor directory" fi if [ ! -d /etc/supervisor/conf.d ]; then mkdir /etc/supervisor/conf.d echo "create supervisor configs directory" fi "/opt/elasticbeanstalk/hooks/appdeploy/post/500-supervisor_update.sh": mode: "000755" owner: root group: root content: | #!/usr/bin/env bash . /opt/elasticbeanstalk/support/envvars if ps aux | grep -q "[/]usr/local/bin/supervisord"; then echo "supervisor is running" else echo "start supervisor" /usr/bin/python /usr/local/bin/supervisord --pidfile /var/run/supervisord.pid fi supervisorctl reread supervisorctl update cd /var/app/current/api app/console rabbitmq:setup-fabric --env=$SYMFONY_ENV echo "$(date +'%Y%m%d %T') Check for supervisor update" >> /var/log/directory-hooks-executor.log