Created
December 29, 2017 14:37
-
-
Save lanekatris/39078f5ca1fa9e1a83ce75ceb3576436 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sudo nano /etc/systemd/system/kestrel-hellomvc.service | |
[Unit] | |
Description=Example .NET Web API Application running on Ubuntu | |
[Service] | |
WorkingDirectory=/var/aspnetcore/hellomvc | |
ExecStart=/usr/bin/dotnet /var/aspnetcore/hellomvc/hellomvc.dll | |
Restart=always | |
RestartSec=10 # Restart service after 10 seconds if dotnet service crashes | |
SyslogIdentifier=dotnet-example | |
User=www-data | |
Environment=ASPNETCORE_ENVIRONMENT=Production | |
Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false | |
[Install] | |
WantedBy=multi-user.target | |
# systemctl enable kestrel-hellomvc.service | |
# sudo journalctl -fu kestrel-hellomvc.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment