Skip to content

Instantly share code, notes, and snippets.

@damuz91
Created April 15, 2022 21:12
Show Gist options
  • Save damuz91/271530625eac56a1b1dbeb17b917acd4 to your computer and use it in GitHub Desktop.
Save damuz91/271530625eac56a1b1dbeb17b917acd4 to your computer and use it in GitHub Desktop.
My sidekiq systemd configuration file for AL2
[Unit]
Description=sidekiq
After=syslog.target network.target
[Service]
Type=simple
User=ec2-user
Group=ec2-user
UMask=0002
WorkingDirectory=/home/ec2-user/production/railsapp/current
ExecStart=/home/ec2-user/.rvm/gems/ruby-2.7.0/wrappers/bundle exec sidekiq -C /home/ec2-user/production/railsapp/current/config/sidekiq.yml -e production
Environment=MALLOC_ARENA_MAX=2
# if we crash, restart
RestartSec=1
Restart=on-failure
StandardOutput=syslog
StandardError=syslog
# This will default to "bundler" if we don't specify it
SyslogIdentifier=sidekiq
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment