-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbiliproxy.service
More file actions
43 lines (38 loc) · 851 Bytes
/
biliproxy.service
File metadata and controls
43 lines (38 loc) · 851 Bytes
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
[Unit]
Description=Bilibili API Reverse Proxy Server
Documentation=https://github.com/yourusername/biliproxyjs
After=network.target
Wants=network.target
[Service]
Type=simple
User=nodejs
Group=nodejs
WorkingDirectory=/opt/biliproxyjs
Environment=NODE_ENV=production
Environment=PORT=30002
EnvironmentFile=-/opt/biliproxyjs/.env
ExecStart=/usr/bin/node server.js
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
RestartSec=10
KillMode=mixed
KillSignal=SIGINT
TimeoutStopSec=5
# Security settings
NoNewPrivileges=yes
PrivateTmp=yes
ProtectSystem=strict
ProtectHome=yes
ReadWritePaths=/opt/biliproxyjs
ProtectKernelTunables=yes
ProtectKernelModules=yes
ProtectControlGroups=yes
# Logging
StandardOutput=journal
StandardError=journal
SyslogIdentifier=biliproxy
# Resource limits
LimitNOFILE=8192
LimitNPROC=4096
[Install]
WantedBy=multi-user.target