Add admin Vite app to Aspire AppHost

Registers the Vue admin as an Aspire resource via AddViteApp, wired to
the API so Aspire injects service discovery env vars that the existing
Vite proxy config already reads.
This commit is contained in:
James Wampler
2026-06-30 11:44:21 -07:00
parent f077fe1d8d
commit f317a47041
3 changed files with 15 additions and 1 deletions
+6 -1
View File
@@ -4,6 +4,11 @@ var postgres = builder.AddPostgres("postgres").WithDataVolume("miccheck-pgdata")
var miccheckDb = postgres.AddDatabase("miccheck");
builder.AddProject<Projects.MicCheck_Api>("api").WithReference(miccheckDb).WaitFor(miccheckDb);
var api = builder.AddProject<Projects.MicCheck_Api>("api").WithReference(miccheckDb).WaitFor(miccheckDb);
builder.AddViteApp("admin", "../admin", "serve")
.WithReference(api)
.WaitFor(api)
.WithExternalHttpEndpoints();
builder.Build().Run();
@@ -2,6 +2,7 @@
<ItemGroup>
<ProjectReference Include="..\api\MicCheck.Api\MicCheck.Api.csproj" />
<ProjectReference Include="..\admin\Admin.esproj" />
</ItemGroup>
<ItemGroup>
@@ -4,5 +4,13 @@
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"Dashboard": {
"Frontend": {
"AuthMode": "Unsecured"
},
"Otlp": {
"AuthMode": "Unsecured"
}
}
}