30 lines
673 B
Desktop File
30 lines
673 B
Desktop File
[Unit]
|
|
Description=LocationHub Service
|
|
Documentation=https://git.mosad.xyz/localhorst/LocationHub
|
|
After=network.target systemd-networkd-wait-online.service mysqld.service
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=locationhub
|
|
Group=locationhub
|
|
WorkingDirectory=/home/locationhub/git/LocationHub/server/
|
|
|
|
# Combine commands for build and start
|
|
ExecStart=/bin/bash -c "/usr/bin/npm run build && /usr/bin/npm run start"
|
|
|
|
# Restart policies
|
|
Restart=on-failure
|
|
RestartSec=5s
|
|
|
|
# Logging configuration
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
SyslogIdentifier=locationhub
|
|
|
|
# Resource control (optional but helps stability)
|
|
MemoryLimit=512M
|
|
CPUQuota=50%
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|