Skip to content

Instantly share code, notes, and snippets.

@sanchesfranklin
Last active July 26, 2022 02:38
Show Gist options
  • Save sanchesfranklin/cfde79d22b0900d18db948f03e4f52f7 to your computer and use it in GitHub Desktop.
Save sanchesfranklin/cfde79d22b0900d18db948f03e4f52f7 to your computer and use it in GitHub Desktop.
serviço asp net core kestrel
[Unit]
Description=Example .NET Web API App running on Ubuntu
[Service]
WorkingDirectory=/var/www/testeWebApiLinux
ExecStart=/usr/bin/dotnet /var/www/testeWebApiLinux/testeWebApiLinux.dll
Restart=always
# Restart service after 10 seconds if the dotnet service crashes:
RestartSec=10
KillSignal=SIGINT
SyslogIdentifier=dotnet-example
User=www-data
Environment=ASPNETCORE_ENVIRONMENT=Production
Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment