Update hubproxy.service
This commit is contained in:
@@ -1,9 +1,7 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=HubProxy - Docker Registry Proxy Service
|
Description=hubproxy
|
||||||
Documentation=https://github.com/sky22333/hubproxy
|
|
||||||
After=network-online.target
|
After=network-online.target
|
||||||
Wants=network-online.target
|
Wants=network-online.target
|
||||||
AssertPathExists=/opt/hubproxy/hubproxy
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
@@ -11,26 +9,9 @@ User=root
|
|||||||
Group=root
|
Group=root
|
||||||
WorkingDirectory=/opt/hubproxy
|
WorkingDirectory=/opt/hubproxy
|
||||||
ExecStart=/opt/hubproxy/hubproxy
|
ExecStart=/opt/hubproxy/hubproxy
|
||||||
ExecReload=/bin/kill -HUP $MAINPID
|
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=5
|
RestartSec=5
|
||||||
StartLimitInterval=60
|
Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
StartLimitBurst=3
|
|
||||||
KillMode=mixed
|
|
||||||
KillSignal=SIGTERM
|
|
||||||
TimeoutStopSec=30
|
|
||||||
TimeoutStartSec=30
|
|
||||||
|
|
||||||
# 安全设置 - 保持必要的安全限制
|
|
||||||
PrivateTmp=true
|
|
||||||
ProtectHome=true
|
|
||||||
ReadWritePaths=/opt/hubproxy
|
|
||||||
|
|
||||||
# 资源限制
|
|
||||||
LimitNOFILE=65536
|
|
||||||
LimitNPROC=4096
|
|
||||||
|
|
||||||
# 日志设置
|
|
||||||
StandardOutput=journal
|
StandardOutput=journal
|
||||||
StandardError=journal
|
StandardError=journal
|
||||||
SyslogIdentifier=hubproxy
|
SyslogIdentifier=hubproxy
|
||||||
|
|||||||
Reference in New Issue
Block a user