Skip to content

Instantly share code, notes, and snippets.

@gillien
Created December 22, 2017 12:53
Show Gist options
  • Save gillien/00685d43df26078e40a7ddf1fc0fbd63 to your computer and use it in GitHub Desktop.
Save gillien/00685d43df26078e40a7ddf1fc0fbd63 to your computer and use it in GitHub Desktop.
[Unit]
Description=Puma HTTP Server
After=network.target
# Uncomment for socket activation (see below)
# Requires=puma.socket
[Service]
# Foreground process (do not use --daemon in ExecStart or config.rb)
Type=simple
# Preferably configure a non-privileged user
User=deploy
Group=deploy
# Specify the path to your puma application root
WorkingDirectory=/home/deploy/quantizr_web/current
# Helpful for debugging socket activation, etc.
# The command to start Puma
ExecStart=/home/deploy/.rvm/bin/rvm 2.4.2 exec bundle exec puma -C /home/deploy/quantizr_web/current/config/puma.rb
ExecStop=/home/deploy/.rvm/bin/rvm 2.4.2 exec bundle exec pumactl -S /home/deploy/quantizr_web/shared/pids/puma.state stop
Restart=always
[Install]
WantedBy=multi-user.target
@gillien
Copy link
Author

gillien commented Dec 22, 2017

sudo vi /etc/systemd/system/puma.service
sudo systemctl enable puma.service
sudo systemctl start puma.service

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment