From a94f97ff855571a458eca23ab5de284ff97ac99d Mon Sep 17 00:00:00 2001 From: Robert Marshall Date: Sun, 28 Apr 2019 13:37:03 +0100 Subject: [PATCH] Add systemd service file --- Infrastructure/website.service | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Infrastructure/website.service diff --git a/Infrastructure/website.service b/Infrastructure/website.service new file mode 100644 index 0000000..a7cf10e --- /dev/null +++ b/Infrastructure/website.service @@ -0,0 +1,16 @@ +[Unit] +Description=Robware + +[Service] +WorkingDirectory=/var/www/Website +ExecStart=/usr/local/bin/dotnet /var/www/Website/Website.dll +Restart=always +# Restart service after 10 seconds if the dotnet service crashes: +RestartSec=10 +KillSignal=SIGINT +SyslogIdentifier=Website +User=apache +Environment=ASPNETCORE_ENVIRONMENT=Production + +[Install] +WantedBy=multi-user.target \ No newline at end of file