Add systemd service and Makefile for Linux installation

This commit is contained in:
Jose Luis Montañes Ojados
2026-01-27 02:41:43 +01:00
parent aa0e07a361
commit 0865aba041
2 changed files with 94 additions and 0 deletions

31
grokway.service Normal file
View 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