This is an attempt to run rails API, Redis Server and Sidekiq Worker on a AWS Beanstalk web environment. This type of configuration is suitable for feature or staging environments. For the production environment, consider using ElasticCache for redis server and separate web/ worker environment for sidekiq workers. This setup usages Rails 6
, Redis 4
and Sidekiq 6
running on Amazon Linux 2 instance. For the deployment on the Linux 1 instance checkout to Linux1
branch.
Based on
- https://medium.com/kite-srm/setting-up-sidekiq-6-0-on-aws-b4f2e01f451c
- https://github.com/mperham/sidekiq/blob/master/examples/systemd/sidekiq.service
Updates:
systemd
is used instead ofupstart
- Support for Linux 2 AMI
Features:
- Setup Redis server
- Run sidekiq as a service using systemd
- Enable swap memory
- Restart sidekiq on configuration change