systemd integration
This commit is contained in:
parent
8bd61cd7ee
commit
a27d8d5397
|
@ -9,7 +9,8 @@ public static class Program
|
|||
{
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
builder.Host.UseSystemd();
|
||||
|
||||
var connectionString = builder.Configuration.GetConnectionString("DefaultConnection") ??
|
||||
throw new InvalidOperationException("Connection string 'DefaultConnection' not found.");
|
||||
builder.Services.AddDbContextFactory<AppDbContext>(options => options
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting.Systemd" Version="7.0.0" />
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="7.0.0" />
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite" Version="7.0.0" />
|
||||
</ItemGroup>
|
||||
|
|
Loading…
Reference in a new issue