Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- commands:
- create_post_dir:
- command: "mkdir /opt/elasticbeanstalk/hooks/appdeploy/post"
- command: "mkdir /opt/elasticbeanstalk/hooks/postinit"
- ignoreErrors: true
- files:
- "/opt/elasticbeanstalk/hooks/appdeploy/post/50_restart_sidekiq.sh":
- mode: "000755"
- owner: root
- group: root
- content: |
- #!/usr/bin/env bash
- source /usr/local/share/chruby/chruby.sh
- chruby current
- . /opt/elasticbeanstalk/support/envvars
- cd /var/app/current
- if [ -f /var/app/containerfiles/pids/sidekiq.pid ]
- then
- kill -TERM `cat /var/app/containerfiles/pids/sidekiq.pid`
- rm -rf /var/app/containerfiles/pids/sidekiq.pid
- fi
- . /opt/elasticbeanstalk/support/envvars.d/sysenv
- sleep 10
- bundle exec sidekiq -e $RAILS_ENV -C /var/app/current/config/sidekiq.yml -L /var/app/containerfiles/logs/sidekiq.log -d
- "/opt/elasticbeanstalk/hooks/appdeploy/pre/03_mute_sidekiq":
- mode: "000755"
- owner: root
- group: root
- ignoreErrors: true
- content: |
- #!/usr/bin/env bash
- cd /var/app/current
- source /usr/local/share/chruby/chruby.sh
- chruby current
- . /opt/elasticbeanstalk/support/envvars
- if [ -f /var/app/containerfiles/pids/sidekiq.pid ]
- then
- kill -USR1 `cat /var/app/containerfiles/pids/sidekiq.pid`
- fi
- "/opt/elasticbeanstalk/hooks/restartappserver/post/50_start_sidekiq.sh":
- mode: "000755"
- owner: root
- group: root
- content: |
- #!/usr/bin/env bash
- source /user/local/share/chruby/chruby.sh
- chruby current
- . /opt/elasticbeanstalk/support/envvars
- cd /var/app/current
- if ! [ -f /var/app/containerfiles/pids/sidekiq.pid ]
- then
- bundle exec sidekiq -e $RAILS_ENV -C /var/app/current/sidekiq.yml -L /var/app/containerfiles/logs/sidekiq.log -d
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement