May 10, 2019 09:51 PM|Metonymy|LINK
If you're using a Linux environment then you can use systemd (for distros that support this).
First publish your application:
dotnet publish --output publish --configuration release
Then, you'll need to create a script with execute privileges that runs your dotnet console app.
Then you'll need to create a systemd service file in the following location;
sudo touch /etc/systemd/system/my_dotnet.service
and populate the file with:
You can then use the following commands with your new service:
sudo systemctl enable my_dotnet // enable at boot and start servicesudo systemctl disable my_dotnet // disable at boot and stop servicesudo systemctl start my_dotnet // start servicesudo systemctl stop my_dotnet // stop servicesudo systemctl restart my_dotnet // restart service
Another way of deploying your application would be to use Docker. If this isn't the answer you were looking for then maybe this helps: https://docs.microsoft.com/en-us/dotnet/core/deploying/