Created
January 16, 2021 12:41
-
-
Save songjiz/b0e36a34721c3a2284f99c2e60c2f9e2 to your computer and use it in GitHub Desktop.
systemd puma service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Puma HTTP Server | |
After=network.target | |
# Uncomment for socket activation (see below) | |
# Requires=puma.socket | |
[Service] | |
Type=simple | |
# Preferably configure a non-privileged user | |
# User= | |
# The path to the your application code root directory. | |
# Also replace the "<YOUR_APP_PATH>" place holders below with this path. | |
# Example /home/username/myapp | |
WorkingDirectory=/var/www/app/current | |
# Helpful for debugging socket activation, etc. | |
# Environment=PUMA_DEBUG=1 | |
Environment="RAILS_ENV=production" | |
ExecStart=/root/.rbenv/shims/bundle exec puma -C /var/www/app/shared/config/puma.rb | |
Restart=always | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment