-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrunewager.service
More file actions
54 lines (45 loc) · 1.38 KB
/
runewager.service
File metadata and controls
54 lines (45 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# =============================================================================
# Runewager Bot — systemd service template (repo canonical version)
# =============================================================================
[Unit]
Description=Runewager GambleCodez Telegram Bot
After=network-online.target
Wants=network-online.target
StartLimitIntervalSec=60
StartLimitBurst=3
[Service]
Type=simple
WorkingDirectory=/var/www/html/Runewager
ExecStart=/usr/bin/node --no-deprecation --trace-warnings=false /var/www/html/Runewager/index.js
User=runewager
Group=runewager
EnvironmentFile=/var/www/html/Runewager/.env
Environment=NODE_ENV=production
# Restart policy: stop looping after 3 failures
Restart=on-failure
RestartSec=5
# Graceful shutdown
KillSignal=SIGTERM
TimeoutStopSec=30
# Logging
StandardOutput=append:/var/www/html/Runewager/logs/runewager.log
StandardError=append:/var/www/html/Runewager/logs/runewager-error.log
# Resource limits
MemoryMax=500M
CPUQuota=80%
LimitNOFILE=65536
# Security sandboxing
ProtectSystem=full
ProtectHome=true
PrivateTmp=true
PrivateDevices=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
RestrictSUIDSGID=true
NoNewPrivileges=true
UMask=0077
# Explicit write access
ReadWritePaths=/var/www/html/Runewager/logs /var/www/html/Runewager/data /var/www/html/Runewager/qa /root/.npm /root/.cache
[Install]
WantedBy=multi-user.target