Skip to content

Instantly share code, notes, and snippets.

@somidad
Last active October 21, 2016 16:09
Show Gist options
  • Save somidad/578d51c36fdc74f02f0655f43cc0a491 to your computer and use it in GitHub Desktop.
Save somidad/578d51c36fdc74f02f0655f43cc0a491 to your computer and use it in GitHub Desktop.
systemd scripts for Puma (for Redmine)
# /lib/systemd/system/redmine.service
[Unit]
Description=Redmine Puma server
After=network.target
[Service]
Type=simple
User=<username>
Group=<groupname>
# replace with your Redmine directory
WorkingDirectory=/opt/redmine
ExecStart=/usr/local/bin/redmine_systemd.sh
#Restart=on-failure
Restart=always
[Intall]
WantedBy=multi-user.target
# /usr/local/bin/redmine_systemd.sh
source $HOME/.rvm/scripts/rvm
rvm use 2.1.2 --default
# replace with your Redmine directory
cd /opt/redmine
bundle exec puma --config config/puma.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment