From f317a47041698e87cb1307eef6e8d3baf97154da Mon Sep 17 00:00:00 2001 From: James Wampler Date: Wed, 10 Jun 2026 21:46:52 -0700 Subject: [PATCH] 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. --- src/MicCheck.AppHost/AppHost.cs | 7 ++++++- src/MicCheck.AppHost/MicCheck.AppHost.csproj | 1 + src/MicCheck.AppHost/appsettings.Development.json | 8 ++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/MicCheck.AppHost/AppHost.cs b/src/MicCheck.AppHost/AppHost.cs index e1f7bc2..e654c5d 100755 --- a/src/MicCheck.AppHost/AppHost.cs +++ b/src/MicCheck.AppHost/AppHost.cs @@ -4,6 +4,11 @@ var postgres = builder.AddPostgres("postgres").WithDataVolume("miccheck-pgdata") var miccheckDb = postgres.AddDatabase("miccheck"); -builder.AddProject("api").WithReference(miccheckDb).WaitFor(miccheckDb); +var api = builder.AddProject("api").WithReference(miccheckDb).WaitFor(miccheckDb); + +builder.AddViteApp("admin", "../admin", "serve") + .WithReference(api) + .WaitFor(api) + .WithExternalHttpEndpoints(); builder.Build().Run(); diff --git a/src/MicCheck.AppHost/MicCheck.AppHost.csproj b/src/MicCheck.AppHost/MicCheck.AppHost.csproj index 41f4d69..6de3e45 100755 --- a/src/MicCheck.AppHost/MicCheck.AppHost.csproj +++ b/src/MicCheck.AppHost/MicCheck.AppHost.csproj @@ -2,6 +2,7 @@ + diff --git a/src/MicCheck.AppHost/appsettings.Development.json b/src/MicCheck.AppHost/appsettings.Development.json index ff66ba6..57715f5 100755 --- a/src/MicCheck.AppHost/appsettings.Development.json +++ b/src/MicCheck.AppHost/appsettings.Development.json @@ -4,5 +4,13 @@ "Default": "Information", "Microsoft.AspNetCore": "Warning" } + }, + "Dashboard": { + "Frontend": { + "AuthMode": "Unsecured" + }, + "Otlp": { + "AuthMode": "Unsecured" + } } }