lib/tomo/plugin/sidekiq/service.erb
[Unit]
Description=Sidekiq for <%= settings[:application] %>
After=syslog.target network.target
ConditionPathExists=<%= paths.current %>
[Service]
ExecStart=/bin/bash -lc 'exec bundle exec sidekiq'
Restart=always
RestartSec=1
StandardError=syslog
StandardOutput=syslog
SyslogIdentifier=%n
Type=notify
WatchdogSec=10
WorkingDirectory=<%= paths.current %>
# Greatly reduce Ruby memory fragmentation and heap usage
# https://www.mikeperham.com/2018/04/25/taming-rails-memory-bloat/
Environment=MALLOC_ARENA_MAX=2
[Install]
WantedBy=default.target