Embed Elsa Studio Blazor WASM in the same host
- Elsa.Studio.Wasm project (net9.0): WASM shell with Login/Dashboard/Workflows modules,
reads its backend URL from a JS-injected window.getClientConfig() so the same build
can point at any origin without a rebuild.
- Elsa.CustomServer:
- references Elsa.Studio.Wasm as a project so `dotnet publish` emits its wwwroot/
- UseBlazorFrameworkFiles + MapFallbackToPage('/_Host') serve the WASM app + SPA routes
- Pages/_Host.cshtml renders the Studio shell and injects apiUrl at request time
- Bumped Elsa server packages to 3.5.3, Studio packages to 3.7.0 (Studio release train
moved ahead of server; 3.7 Studio is compatible with 3.5 server API)
- Dockerfile: SDK/runtime 9.0, restores both csprojs before copying sources
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
# Elsa Custom Server — Docker image
|
||||
# Multi-stage build so the final image only carries the ASP.NET runtime.
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
||||
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
|
||||
WORKDIR /source
|
||||
|
||||
# Restore first for better layer caching.
|
||||
COPY src/Elsa.CustomServer/Elsa.CustomServer.csproj src/Elsa.CustomServer/
|
||||
COPY src/Elsa.Studio.Wasm/Elsa.Studio.Wasm.csproj src/Elsa.Studio.Wasm/
|
||||
RUN dotnet restore src/Elsa.CustomServer/Elsa.CustomServer.csproj
|
||||
|
||||
# Then copy the rest and publish.
|
||||
@@ -13,7 +14,7 @@ COPY src/ src/
|
||||
RUN dotnet publish src/Elsa.CustomServer/Elsa.CustomServer.csproj \
|
||||
-c Release -o /app/publish --no-restore /p:UseAppHost=false
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS runtime
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/publish ./
|
||||
|
||||
|
||||
Reference in New Issue
Block a user