-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmsk-paste.service
More file actions
46 lines (37 loc) · 1.97 KB
/
msk-paste.service
File metadata and controls
46 lines (37 loc) · 1.97 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
# ============================================================================
# MSK Paste – systemd Service Unit
#
# This file lives in the repo root and is copied by GitHub Actions to
# /etc/systemd/system/msk-paste.service during deployment.
# ============================================================================
[Unit]
Description=MSK Paste – Self-hosted Pastebin
Documentation=https://github.com/MSK-Scripts/msk-paste
After=network.target mariadb.service
Wants=mariadb.service
# ─── Restart rate limit ──────────────────────────────────────────────
# StartLimit* belong in [Unit], not [Service] (modern systemd).
StartLimitIntervalSec=60
StartLimitBurst=5
[Service]
Type=simple
User=musiker15
Group=musiker15
WorkingDirectory=/opt/msk-paste
# ─── Environment ─────────────────────────────────────────────────────
Environment=NODE_ENV=production
EnvironmentFile=/opt/msk-paste/.env
# ─── Start command ───────────────────────────────────────────────────
ExecStart=/usr/bin/npm start
# ─── Restart behaviour ───────────────────────────────────────────────
Restart=on-failure
RestartSec=10
# ─── Logging to journald ─────────────────────────────────────────────
StandardOutput=journal
StandardError=journal
SyslogIdentifier=msk-paste
# ─── Resource limits ─────────────────────────────────────────────────
LimitNOFILE=4096
LimitNPROC=512
[Install]
WantedBy=multi-user.target