Files
vps_web/deploy/vps_price.service
ddrwode 540db103a8 哈哈
2026-02-09 16:52:28 +08:00

26 lines
646 B
Desktop File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Gunicorn 后台常驻:复制到 /etc/systemd/system/vps_price.service
# 路径按你服务器改WorkingDirectory、Environment、ExecStart 里的两处
#
# sudo systemctl daemon-reload
# sudo systemctl enable vps_price
# sudo systemctl start vps_price
# sudo systemctl status vps_price
[Unit]
Description=VPS Price Gunicorn
After=network.target
[Service]
Type=notify
User=root
Group=root
WorkingDirectory=/home/vps_web
Environment="PATH=/home/vps_web/.venv/bin"
ExecStart=/home/vps_web/.venv/bin/gunicorn -w 4 -b 0.0.0.0:5001 app:app
ExecReload=/bin/kill -s HUP $MAINPID
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target