super_ball/thrower_daemon/superball-thrower.service

45 lines
990 B
Desktop File

[Unit]
Description=Superball Thrower Daemon
Documentation=https://github.com/superball/thrower
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=superball
Group=superball
WorkingDirectory=/path/to/thrower_daemon
ExecStart=/usr/bin/node daemon.js /etc/superball/config.json
Restart=always
RestartSec=10
StandardOutput=journal
StandardError=journal
SyslogIdentifier=superball-thrower
# Security settings
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/var/log/superball
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
RestrictRealtime=true
RestrictSUIDSGID=true
LockPersonality=true
MemoryDenyWriteExecute=true
RestrictNamespaces=true
SystemCallFilter=@system-service
SystemCallErrorNumber=EPERM
# Resource limits
LimitNOFILE=65536
LimitNPROC=4096
# Environment
Environment=NODE_ENV=production
Environment=NODE_OPTIONS=--max-old-space-size=512
[Install]
WantedBy=multi-user.target