Added postgres docker db for local development
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
var builder = DistributedApplication.CreateBuilder(args);
|
||||
|
||||
var db = builder.AddConnectionString("LutraDb");
|
||||
var postgres = builder.AddPostgres("postgres")
|
||||
.WithDataVolume()
|
||||
.WithLifetime(ContainerLifetime.Persistent);
|
||||
|
||||
var db = postgres
|
||||
.AddDatabase("LutraDb");
|
||||
|
||||
var migrator = builder.AddProject<Projects.Lutra_Infrastructure_Migrator>("dbmigrator")
|
||||
.WithReference(db);
|
||||
.WithReference(db)
|
||||
.WaitFor(db);
|
||||
|
||||
var apiService = builder.AddProject<Projects.Lutra_API>("apiservice")
|
||||
.WithHttpHealthCheck("/health")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<Sdk Name="Aspire.AppHost.Sdk" Version="9.5.0" />
|
||||
|
||||
@@ -11,7 +11,8 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Aspire.Hosting.AppHost" Version="13.1.3" />
|
||||
<PackageReference Include="Aspire.Hosting.AppHost" Version="13.2.1" />
|
||||
<PackageReference Include="Aspire.Hosting.PostgreSQL" Version="13.2.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
{
|
||||
"ConnectionStrings": {
|
||||
"LutraDb": "Host=db.m91.nl;Username=user;Password=password;Database=Lutra"
|
||||
},
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
|
||||
Reference in New Issue
Block a user