Skip to content

Instantly share code, notes, and snippets.

@ManojNair
Created April 5, 2020 07:58
Show Gist options
  • Save ManojNair/03bf619ec2f9148a3e297d114428de0a to your computer and use it in GitHub Desktop.
Save ManojNair/03bf619ec2f9148a3e297d114428de0a to your computer and use it in GitHub Desktop.
.NET Core SystemD Config File
[Unit]
Description=Example .NET Web API App running on Amazon Linux
[Service]
WorkingDirectory=/home/ec2-user/letsdotnet
ExecStart=/usr/bin/dotnet /home/ec2-user/letsdotnet/LetsDotNet.dll
Restart=always
# Restart service after 10 seconds if the dotnet service crashes:
RestartSec=10
KillSignal=SIGINT
SyslogIdentifier=LetsDotNet
#User=apache
Environment=ASPNETCORE_ENVIRONMENT=Production
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment