hr-system/deploy/hr-web.service

23 lines
842 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.

# hr-web systemd unit测试环境 hrstest.opencomputing.cn
# T02b 变更:服务端口 9182→9280客户确认见 docs/部署环境需求.md 与 docs/01-design/architecture.md §7
# 安装sudo cp hr-web.service /etc/systemd/system/ && sudo systemctl daemon-reload && sudo systemctl enable --now hr-web
[Unit]
Description=hr-web 人事系统 Web 服务 (ahserver, port 9280)
After=network.target mariadb.service redis.service
Wants=mariadb.service redis.service
[Service]
Type=simple
User=hrstest
Group=hrstest
WorkingDirectory=/opt/hrs
Environment=PYTHONUNBUFFERED=1
ExecStart=/opt/hrs/venv/bin/python -m ahserver --config /opt/hrs/conf/config.json
Restart=always
RestartSec=5
# 端口 9280 探活(监控基线项)
ExecStartPost=/bin/sh -c 'sleep 2 && ss -ltn | grep -q ":9280 "'
[Install]
WantedBy=multi-user.target