Created
May 22, 2018 11:50
-
-
Save murilomothsin/9e1632d96c7ea04e1dbc93c83f695d77 to your computer and use it in GitHub Desktop.
Systemd scripts (/etc/systemd/system)
This file contains 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] | |
# https://github.com/puma/puma/blob/master/docs/systemd.md | |
Description=Puma HTTP Server | |
After=network.target | |
[Service] | |
Type=simple | |
User=user | |
WorkingDirectory=/path/to/your/project | |
ExecStart=/bin/bash -lc 'bundle exec puma -C /path/to/your/project/config/puma.rb' | |
Restart=always | |
[Install] | |
WantedBy=multi-user.target |
This file contains 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=sidekiq | |
After=syslog.target network.target | |
[Service] | |
Type=simple | |
WorkingDirectory=/path/to/your/project | |
# If you use rbenv: | |
ExecStart=/bin/bash -lc 'bundle exec sidekiq -e production 2>&1 > /path/to/your/project/log/sidekiq.log' | |
User=user | |
Group=user | |
UMask=0002 | |
Environment=MALLOC_ARENA_MAX=2 | |
RestartSec=1 | |
Restart=on-failure | |
# This will default to "bundler" if we don't specify it | |
SyslogIdentifier=sidekiq | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment