Here's an example of systemd setting for launching SolidQueue for production enviroment.
[Unit]
Description=Solid Queue
After=network.target
[Service]
Type=simple
User=lmuser
WorkingDirectory=/var/www/myapp/current
Environment="RAILS_ENV=production"
ExecStart=rbenv exec bundle exec rails solid_queue:start
Restart=always
[Install]
WantedBy=multi-user.target
If the file is saved as /etc/systemd/system/sq-myapp.service, you can enable and start the service with:
systemctl daemon-reload
systemctl enable sq-myapp
systemctl start sq-myapp
To see the logs, use:
journalctl -u sq-myapp