Files
douyin/deploy/kefu.service
T
2026-07-17 09:24:47 +08:00

26 lines
704 B
Desktop File

# systemd 服务单元示例
# 安装: sudo cp deploy/kefu.service /etc/systemd/system/
# sudo systemctl daemon-reload
# sudo systemctl enable --now kefu
[Unit]
Description=Douyin Kefu Auto-Reply System
After=network.target
[Service]
Type=simple
User=www
Group=www
WorkingDirectory=/www/wwwroot/douyin/backend
Environment=KEFU_HOST=0.0.0.0
Environment=KEFU_PORT=8000
Environment=KEFU_SERVE_WEB=true
Environment=PLAYWRIGHT_BROWSERS_PATH=/www/wwwroot/douyin/playwright-browsers
EnvironmentFile=-/www/wwwroot/douyin/.env
ExecStart=/www/wwwroot/douyin/backend/.venv/bin/python -m uvicorn main:app --host 0.0.0.0 --port 8000
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target