Linux service definition

This commit is contained in:
Robert Marshall 2020-04-11 13:04:22 +01:00
parent e79aa4a78d
commit c4a9e9ded8

16
api.blog.service Normal file
View file

@ -0,0 +1,16 @@
[Unit]
Description=Robware Blog API
[Service]
WorkingDirectory=/var/www/Api.Blog
ExecStart=/usr/bin/dotnet /var/www/Api.Blog/Robware.Api.Blog.dll
Restart=always
# Restart service after 10 seconds if the dotnet service crashes:
RestartSec=10
KillSignal=SIGINT
SyslogIdentifier=Api.Blog
User=www-data
Environment=ASPNETCORE_ENVIRONMENT=Production
[Install]
WantedBy=multi-user.target