添加系统服务dvsv3-query.service
- /usr/lib/systemd/system
[Unit]
Description=dvsv3-query
After=network-online.target
Wants=network-online.target
[Service]
# modify when deploy in prod env
User=dvs
Group=dvs
Type=simple
ExecStart=/usr/local/dotnet-sdk/dotnet /usr/local/sunlight/dvsv3/dvs-query/DVS.Query.Api.dll
WorkingDirectory=/usr/local/sunlight/dvsv3/dvs-query
Restart=always
RestartSec=1
StartLimitInterval=0
[Install]
WantedBy=multi-user.target