Deploy the REST API to the VPS

This commit is contained in:
Andrii Tykhonov 2024-07-11 16:55:10 +03:00
parent f48b76ce00
commit 30a4545617
3 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,16 @@
[Unit]
Description=Devices REST API
[Service]
WorkingDirectory=/home/tester/devices-rest-api/publish
ExecStart=/home/tester/.dotnet/dotnet /home/tester/devices-rest-api/publish/DevicesRestApi.dll
Restart=always
# Restart service after 10 seconds if the dotnet service crashes:
RestartSec=10
KillSignal=SIGINT
SyslogIdentifier=devices-rest-api
Environment=ASPNETCORE_ENVIRONMENT=Production
Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false
[Install]
WantedBy=multi-user.target

View File

@ -4,6 +4,7 @@
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
</PropertyGroup>
<ItemGroup>

View File

@ -10,6 +10,7 @@
"ApiKey": "api-key",
"ClustersRootPath": "/tmp/projects"
},
"Urls": "http://0.0.0.0:8765",
"AllowedHosts": "*",
"Serilog": {
"MinimumLevel": {