Skip to content

Instantly share code, notes, and snippets.

View Morxander's full-sized avatar

Morad Edwar Morxander

View GitHub Profile
@Morxander
Morxander / sidekiq.config
Last active August 30, 2017 09:52 — forked from maxdbn/sidekiq.config
Gracefully restarting Sidekiq on Elasticbeanstalk, only after it's done with the running jobs. Tested on: 64bit Amazon Linux 2016.09 v2.3.0 running Ruby 2.3 (Puma). Thanks to ssaunier for the original gist! https://gist.github.com/MaxDBN/b80d6e5fac7f1a05f2727474ff172ea6
# Sidekiq interaction and startup script
commands:
create_post_dir:
command: "mkdir -p /opt/elasticbeanstalk/hooks/appdeploy/post"
ignoreErrors: true
files:
"/opt/elasticbeanstalk/hooks/appdeploy/post/50_restart_sidekiq.sh":
mode: "000755"
owner: root
group: root