初始化
This commit is contained in:
29
deploy/systemd/wps-bot.service
Normal file
29
deploy/systemd/wps-bot.service
Normal file
@@ -0,0 +1,29 @@
|
||||
[Unit]
|
||||
Description=WPS Bot Game Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=ubuntu
|
||||
WorkingDirectory=/opt/wps-bot
|
||||
Environment="PATH=/home/ubuntu/miniconda3/envs/liubai/bin"
|
||||
ExecStart=/home/ubuntu/miniconda3/envs/liubai/bin/uvicorn app:app --host 0.0.0.0 --port 8000 --workers 1 --limit-concurrency 5
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
# 安全选项
|
||||
NoNewPrivileges=true
|
||||
PrivateTmp=true
|
||||
|
||||
# 资源限制
|
||||
MemoryLimit=512M
|
||||
CPUQuota=100%
|
||||
|
||||
# 日志
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
SyslogIdentifier=wps-bot
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
Reference in New Issue
Block a user