Add systemd service and Makefile for Linux installation
This commit is contained in:
31
grokway.service
Normal file
31
grokway.service
Normal file
@@ -0,0 +1,31 @@
|
||||
[Unit]
|
||||
Description=Grokway Server Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
# User/Group to run as.
|
||||
User=grokway
|
||||
Group=grokway
|
||||
|
||||
# Working Directory. This is important because the code relies on relative paths
|
||||
# like ./cmd/server/static. If we install everything to /opt/grokway, this works.
|
||||
WorkingDirectory=/opt/grokway
|
||||
|
||||
# Path to the executable.
|
||||
ExecStart=/opt/grokway/grokway
|
||||
|
||||
# Environment variables.
|
||||
# You MUST set this to a secure token, otherwise a random one is generated on each start.
|
||||
#Environment=GROKWAY_TOKEN=your-very-secure-token
|
||||
|
||||
# Restart policy.
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
||||
# Standard output/error logging.
|
||||
StandardOutput=syslog
|
||||
StandardError=syslog
|
||||
SyslogIdentifier=grokway
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user