Skip to content

Containerize ASP.NET Core EasyQuery samples + upgrade analysis#43

Open
devin-ai-integration[bot] wants to merge 1 commit into
masterfrom
devin/1780302357-containerize-and-upgrade-analysis
Open

Containerize ASP.NET Core EasyQuery samples + upgrade analysis#43
devin-ai-integration[bot] wants to merge 1 commit into
masterfrom
devin/1780302357-containerize-and-upgrade-analysis

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Jun 1, 2026

Copy link
Copy Markdown

Summary

Adds Docker support for the Linux-runnable ASP.NET Core samples and documents concrete upgrade opportunities found while building them. The repo previously had no containerization (no Dockerfiles/compose).

  • Multi-stage Dockerfile per project + root docker-compose.yml.
  • Apps self-seed a SQLite Northwind DB on startup from App_Data/EqDemoData.zip, so no external DB is needed.
  • docker compose up -d --build brings up 8 services that build and serve HTTP 200 (verified). 3 legacy SPA samples that currently fail to build are gated behind a needs-upgrade profile so they don't break the default up.
  • UPGRADES.md captures framework / NuGet / front-end upgrade findings (evidence-based, observed during the builds).

Services (verified up -d --build, all HTTP 200)

Port Service TFM
8001 razor-advancedsearch net8.0
8002 razor-adhocreporting net8.0
8003 razor-datafiltering net8.0
8004 mvc-datafiltering net8.0
8005 blazor-server net6.0
8006 blazor-wasm net6.0
8007 angular-advancedsearch net8.0 + Angular 12 (Node 16)
8013 razor-ts-adhocreporting net8.0 + Rollup 4 (Node 20)

net6.0 apps build with the .NET 8 SDK and run on aspnet:6.0; net8.0 apps run on aspnet:8.0. SPA build stages copy Node into the SDK image (COPY --from=node:16/20 ...).

Not containerized

  • AspNet4/, WinForms/, Wpf/ — .NET Framework / net*-windows, Windows-only, can't run in Linux containers.
  • Vue3 and Angular/AdHocReporting use a VS JavaScript .esproj + SpaProxy build that needs a headless-Node refactor first.

Key upgrade findings (see UPGRADES.md for detail)

  • net6.0 is EOL (2024-11-12) → move Blazor/Vue/React/Stencil projects to net8.0 (LTS); this also moves their images off the EOL aspnet:6.0 base.
  • NuGet drift: Microsoft.* packages span 6.0.1/8.0.2/8.0.4/8.0.5 → align on latest 8.0.x.
  • Old CVE-prone packages: Microsoft.Data.SqlClient 2.1.7, System.Data.SqlClient 4.8.6, System.Net.Http 4.3.4, System.Text.RegularExpressions 4.3.1, System.Drawing.Common 4.7.x.
  • EasyQuery/Korzh: Korzh.EasyQuery.* 7.4.0 → 7.4.2, EasyData.Exporters.* 1.5.8/1.5.9 → 1.5.12, Korzh.DbUtils.* → 1.4.3; AspNet4 still on 7.4.0-rc04 prerelease.
  • Front-end toolchains block the SPA builds: React react-scripts ^1.1.5 (Failed to minify), Vue @vue/cli-service ^3 (TS strict-init errors), Stencil 2 (prerender crash), Angular 12 (Node-16-only). Recommend modern equivalents (CRA 5/Vite, Vue 3 + Vite, Stencil 4, Angular 17/18).

Notes

  • Additive only — no existing source/project files changed.
  • Container HTTPS-redirect warnings are expected (only HTTP exposed for the demo).

Link to Devin session: https://app.devin.ai/sessions/65e5330d495b49868deef5754257aadc
Requested by: @iancmoritz


Devin Review

Status Commit
🟢 Reviewed 1e7f592
Open in Devin Review (Staging)

- Multi-stage Dockerfiles for 11 ASP.NET Core EasyQuery sample apps
- Root docker-compose.yml: 8 services build+run clean; 3 legacy SPA
  samples gated behind 'needs-upgrade' profile
- Apps self-seed SQLite Northwind DB on startup (no external DB)
- UPGRADES.md documents framework/NuGet/front-end upgrade opportunities

Co-Authored-By: Ian Moritz <ian.moritz@cognition.ai>
@devin-ai-integration

Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 5 additional findings.

Open in Devin Review

@staging-devin-ai-integration staging-devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 3 potential issues.

View 3 additional findings in Devin Review.

Open in Devin Review (Staging)
Debug

Playground

Comment thread docker-compose.yml
Comment on lines +25 to +52
razor-adhocreporting: # net8.0 (login required: /Identity/Account/Login)
build: { context: ., dockerfile: AspNetCore/Razor-Mvc/Razor.AdHocReporting/Dockerfile }
ports: ["8002:8080"]

razor-datafiltering: # net8.0
build: { context: ., dockerfile: AspNetCore/Razor-Mvc/Razor.DataFiltering/Dockerfile }
ports: ["8003:8080"]

mvc-datafiltering: # net8.0
build: { context: ., dockerfile: AspNetCore/Razor-Mvc/Mvc.DataFiltering/Dockerfile }
ports: ["8004:8080"]

blazor-server: # net6.0 (EOL) -> runs on aspnet:6.0
build: { context: ., dockerfile: AspNetCore/Blazor/AdvancedSearch.BlazorServer/Dockerfile }
ports: ["8005:8080"]

blazor-wasm: # net6.0 (EOL) -> runs on aspnet:6.0
build: { context: ., dockerfile: AspNetCore/Blazor/AdHocReporting.BlazorWasm/Server/Dockerfile }
ports: ["8006:8080"]

# ---- SPA-backed that build cleanly ----
angular-advancedsearch: # net8.0 + Angular 12 (built on Node 16)
build: { context: ., dockerfile: AspNetCore/Angular/AdvancedSearch/Dockerfile }
ports: ["8007:8080"]

razor-ts-adhocreporting: # net8.0 + TypeScript/Rollup 4 (built on Node 20)
build: { context: ., dockerfile: AspNetCore/Razor-Mvc/RazorTypeScript.AdHocReporting/Dockerfile }
ports: ["8013:8080"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Linux AdHoc containers miss the seeded reports because the app looks for a backslash path

The default compose stack now advertises the AdHoc Reporting containers as working services, but these apps run on Linux while their DefaultReportGenerator builds the seed directory as Path.Combine(env.ContentRootPath, $"App_Data\\Seed") (AspNetCore/Razor-Mvc/Razor.AdHocReporting/Services/DefaultReportGenerator.cs:23-27, AspNetCore/Razor-Mvc/RazorTypeScript.AdHocReporting/Services/DefaultReportGenerator.cs:23-27, AspNetCore/Blazor/AdHocReporting.BlazorWasm/Server/Services/DefaultReportGenerator.cs:24-28). On Linux that backslash is a literal filename character, so it looks for /app/App_Data\Seed instead of the /app/App_Data/Seed directory copied by the new Dockerfiles; first startup catches the resulting exception during default-user initialization and the demo reports are not seeded.

Prompt for agents
The AdHoc Reporting services added to docker-compose.yml run under Linux containers, but each DefaultReportGenerator currently constructs the seed directory with a Windows-style segment: Path.Combine(env.ContentRootPath, $"App_Data\\Seed"). Update the affected generators in AspNetCore/Razor-Mvc/Razor.AdHocReporting/Services/DefaultReportGenerator.cs, AspNetCore/Razor-Mvc/RazorTypeScript.AdHocReporting/Services/DefaultReportGenerator.cs, and AspNetCore/Blazor/AdHocReporting.BlazorWasm/Server/Services/DefaultReportGenerator.cs to construct the path using separate Path.Combine segments so it resolves to App_Data/Seed cross-platform. Then verify a fresh container startup creates the default demo reports.
Open in Devin Review (Staging)

Was this helpful? React with 👍 or 👎 to provide feedback.

Debug

Playground

COPY --from=build /out ./
COPY ["AspNetCore/React/AdvancedSearch/App_Data/", "./App_Data/"]
ENV ASPNETCORE_URLS=http://+:8080
ENV ASPNETCORE_ENVIRONMENT=Development

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Profile SPA images run the published apps in Development and try to start missing dev servers

The profile-only React image sets ASPNETCORE_ENVIRONMENT=Development, but its published final stage contains only /out plus App_Data and does not include Node or the ClientApp source. In Development, Startup.Configure skips UseSpaStaticFiles() and calls spa.UseReactDevelopmentServer(...) (AspNetCore/React/AdvancedSearch/Startup.cs:80-114), so if this container ever builds successfully, UI requests will try to launch a dev server from the runtime image instead of serving the published SPA and will fail. The same Development-mode dev-server path is present in the Vue2 and Stencil profile Dockerfiles via spa.UseVueCli(...) and spa.UseProxyToSpaDevelopmentServer(...) (AspNetCore/Vue2/AdvancedSearch/Startup.cs:79-120, AspNetCore/Stencil/AdvancedSearch/Startup.cs:77-119).

Prompt for agents
The published SPA containers should run with a non-Development ASP.NET Core environment, or the app startup logic must be adjusted to serve the already-published static SPA assets inside the final image. Review the React, Vue2, and Stencil Dockerfiles' ASPNETCORE_ENVIRONMENT settings together with their Startup.UseSpa branches, and verify the final images can serve the root UI without requiring npm or a separate dev server.
Open in Devin Review (Staging)

Was this helpful? React with 👍 or 👎 to provide feedback.

Debug

Playground

Comment thread docker-compose.yml
Comment on lines +17 to +52
services:
# ============ Working services (default) ============

# ---- Pure ASP.NET Core (no Node build) ----
razor-advancedsearch: # net8.0
build: { context: ., dockerfile: AspNetCore/Razor-Mvc/Razor.AdvancedSearch/Dockerfile }
ports: ["8001:8080"]

razor-adhocreporting: # net8.0 (login required: /Identity/Account/Login)
build: { context: ., dockerfile: AspNetCore/Razor-Mvc/Razor.AdHocReporting/Dockerfile }
ports: ["8002:8080"]

razor-datafiltering: # net8.0
build: { context: ., dockerfile: AspNetCore/Razor-Mvc/Razor.DataFiltering/Dockerfile }
ports: ["8003:8080"]

mvc-datafiltering: # net8.0
build: { context: ., dockerfile: AspNetCore/Razor-Mvc/Mvc.DataFiltering/Dockerfile }
ports: ["8004:8080"]

blazor-server: # net6.0 (EOL) -> runs on aspnet:6.0
build: { context: ., dockerfile: AspNetCore/Blazor/AdvancedSearch.BlazorServer/Dockerfile }
ports: ["8005:8080"]

blazor-wasm: # net6.0 (EOL) -> runs on aspnet:6.0
build: { context: ., dockerfile: AspNetCore/Blazor/AdHocReporting.BlazorWasm/Server/Dockerfile }
ports: ["8006:8080"]

# ---- SPA-backed that build cleanly ----
angular-advancedsearch: # net8.0 + Angular 12 (built on Node 16)
build: { context: ., dockerfile: AspNetCore/Angular/AdvancedSearch/Dockerfile }
ports: ["8007:8080"]

razor-ts-adhocreporting: # net8.0 + TypeScript/Rollup 4 (built on Node 20)
build: { context: ., dockerfile: AspNetCore/Razor-Mvc/RazorTypeScript.AdHocReporting/Dockerfile }
ports: ["8013:8080"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚩 Running default containers as Development is mostly intentional for these demos but has side effects

Most non-SPA and Angular/Blazor containers set ASPNETCORE_ENVIRONMENT=Development, which suppresses HSTS and enables developer exception pages/migration endpoints in several projects. For the documented sample/demo use case this appears intentional, and UPGRADES.md calls out the HTTP-only redirect warning as harmless for demos, so I did not classify it as a security bug. If these images are published beyond local demos, reviewers should decide whether to switch the default environment to Production and handle HTTPS/proxy configuration explicitly.

Open in Devin Review (Staging)

Was this helpful? React with 👍 or 👎 to provide feedback.

Debug

Playground

@devin-ai-integration

Copy link
Copy Markdown
Author

End-to-end container test results

Ran docker compose up -d --build and drove all 8 containerized EasyQuery apps in a real browser. Summary: all 8 boot and serve in-container, and the self-seeded SQLite Northwind DB works — the Data Filtering app renders a real grid of "1 – 15 of 830 records".

Important

The interactive EasyQuery query-builder widget (add condition → run query) is blocked by a "No license key for EasyQuery" popup on every sample. This is pre-existing and not a containerization defect: the repo ships blank LicenseKey values in every appsettings.json (only the non-containerizable Vue3 sample has one, and it's rejected as "issued for a different version"). The same popup appears running these samples outside a container. With a valid Korzh license key I can inject it and record the full query flow.

Walkthrough recording

walkthrough

View original video (dotnetsamples-containers-edited.mp4)

★ Core proof — MVC Data Filtering (8004): 830 seeded Northwind records

Server-rendered Orders grid pulls real data from the SQLite DB seeded inside the container on startup.

Data Filtering 830 records

Assertions (8 passed, 1 untested)
  • MVC Data Filtering (8004) — grid shows "1–15 of 830 records" of seeded Northwind data
  • Razor Advanced Search (8001) — EQ UI shell renders; JS widget executes & calls server
  • Blazor Server (8005, net6/aspnet:6.0) — interactive app renders (cross-runtime image works)
  • Angular SPA (8007) — Angular component tree renders; in-Docker Node build produced a working bundle
  • Blazor WASM (8006) — WASM runtime downloads & boots; auth flow runs
  • RazorTS Ad-hoc Reporting (8013) — Identity login as demo@korzh.com succeeds; Node 20 SPA serves
  • Razor Ad-hoc Reporting (8002) — Identity login page renders; HTTP 200
  • ⚠️ Interactive query-builder + execution — UNTESTED, blocked by missing Korzh license key (pre-existing)
  • ⏭️ React / Vue2 / Stencil — not tested (expected build failure; gated behind needs-upgrade profile, see UPGRADES.md)
More screenshots

Razor Advanced Search (8001) — EQ UI shell in-container
Advanced Search

Blazor Server (8005, net6)
Blazor

Angular SPA (8007)
Angular

RazorTS Ad-hoc Reporting (8013) — authenticated as demo@korzh.com
RazorTS

Tested by Devin — session: https://app.devin.ai/sessions/65e5330d495b49868deef5754257aadc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant