Created
April 18, 2016 12:22
-
-
Save manjeshpv/387a4284e05aa5d2fcaa855ed525b31b to your computer and use it in GitHub Desktop.
Systemd service for go and nodejs
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
# go | |
[Unit] | |
Description=Beatle | |
After=syslog.target | |
[Service] | |
WorkingDirectory=/root/go/bin | |
ExecStart=/root/go/bin/hello | |
ExecReload=/usr/bin/kill -HUP $MAINPID | |
Restart=always | |
StandardOutput=syslog | |
StandardError=syslog | |
SyslogIdentifier=beatle | |
User=root | |
Group=root | |
EnvironmentFile=/etc/beatle.env | |
[Install] | |
WantedBy=multi-user.target | |
# nodejs | |
[Unit] | |
Description=<Project Name> | |
After=syslog.target | |
[Service] | |
WorkingDirectory=/var/www | |
ExecStart=/usr/local/bin/node server/index | |
ExecReload=/usr/bin/kill -HUP $MAINPID | |
Restart=always | |
StandardOutput=syslog | |
StandardError=syslog | |
SyslogIdentifier=<project-name> | |
User=root | |
Group=root | |
EnvironmentFile=/var/env/<project-name>.env | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment