feat: add Makefile and systemd service for linux deployment

This commit is contained in:
Jose Luis Montañes Ojados
2026-01-28 17:35:17 +01:00
parent 0b091c93db
commit 126ec47b30
2 changed files with 74 additions and 0 deletions

26
env-guard.service Normal file
View File

@@ -0,0 +1,26 @@
[Unit]
Description=EnvGuard Server
After=network.target
[Service]
# User/Group: Run as root by default to ensure permission to write to /var/lib/env-guard
# You can change this to a specific user if preferred (e.g., User=envguard),
# but remember to 'chown -R envguard:envguard /var/lib/env-guard'
User=root
Group=root
# Path to the binary
ExecStart=/usr/local/bin/env-guard-server
# Directory where services.json and history.json will be stored
WorkingDirectory=/var/lib/env-guard
# Restart policy
Restart=always
RestartSec=5
# Environment variables if needed
# Environment=ENVGUARD_SECRET_TOKEN=your-secret-token
[Install]
WantedBy=multi-user.target