Skip to content

Instantly share code, notes, and snippets.

@damuz91
Created August 29, 2020 01:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save damuz91/4b51fd78c807e56794ef13dcad17ac83 to your computer and use it in GitHub Desktop.
Save damuz91/4b51fd78c807e56794ef13dcad17ac83 to your computer and use it in GitHub Desktop.
Sidekiq service systemd config file
[Unit]
Description=sidekiq
After=syslog.target network.target
[Service]
Type=simple
User=ubuntu
Group=ubuntu
UMask=0002
WorkingDirectory=/path/to/rails
ExecStart=/home/ubuntu/.rvm/gems/ruby-2.6.0/wrappers/bundle exec sidekiq -C /path/to/rails/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