Create a gist now

Instantly share code, notes, and snippets.

Embed
systemd service to start rails/puma
# based on https://gist.github.com/twtw/5494223
# create systemd service file for rails/puma startup
# 0. [if required: rvm use ruby@default]
# 1. rvm wrapper default systemd rails
# 2. put this file in /etc/systemd/system/rails-puma.service
# 3. systemctl enable rails-puma
# 4. systemctl start rails-puma
[Unit]
Description=Rails-Puma Webserver
[Service]
Type=simple
User=app
WorkingDirectory=/home/app/your-app
ExecStart=/home/app/.rvm/bin/systemd_rails server -e production
TimeoutSec=15
Restart=always
[Install]
WantedBy=multi-user.target
@sekrett

This comment has been minimized.

Show comment
Hide comment
@sekrett

sekrett Jul 17, 2017

Where I can find the source for systemd_rails script?

sekrett commented Jul 17, 2017

Where I can find the source for systemd_rails script?

@smikkelsen

This comment has been minimized.

Show comment
Hide comment
@smikkelsen

smikkelsen Feb 23, 2018

+1, this isn't very helpful without the systemd_rails script

+1, this isn't very helpful without the systemd_rails script

@rkleine

This comment has been minimized.

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