Adds per-platform release artifacts and release image validation

This commit is contained in:
BinaryAlley committed 2026-11-30 21:20:42 +02:00
1 parent 92ab62011e
commit 68143dff25
19 files changed
+603 -115

No files matched your search

+2 -3
View File
@@ -47,9 +47,8 @@ FROM base AS final
WORKDIR /app
COPY --from=publish --chown=app:app /app/publish .
# The HTTP port is controlled per run mode: launchSettings.json for local development, ASPNETCORE_HTTP_PORTS here for
# Docker, and for a published DLL run directly on a host, ASPNETCORE_URLS (or ASPNETCORE_HTTP_PORTS) must be set.
ENV ASPNETCORE_HTTP_PORTS=5012
# The container branch in Program.cs binds the web client to this port. Direct published runs default to the documented
# address and can override it with ASPNETCORE_URLS, ASPNETCORE_HTTP_PORTS or ASPNETCORE_HTTPS_PORTS.
EXPOSE 5012
ENTRYPOINT ["dotnet", "Nemera.Presentation.Web.dll"]
@@ -1,6 +1,6 @@
# This image ships the published release artifacts, so the image contents are the same files the release workflow exported.
# Build it with the published Web directory as the context:
# docker build -t nemera-web -f src/Nemera.Presentation.Web/Dockerfile.release bin/web/publish
# Build it with the extracted Linux x64 Web archive as the context.
# docker build -t nemera-web -f src/Nemera.Presentation.Web/Dockerfile.release <extracted-Nemera-version-linux-x64-web>
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS final
# Curl is used by the container healthcheck to probe the /health endpoints.
@@ -14,6 +14,6 @@ WORKDIR /app
COPY --chown=app:app . .
ENV ASPNETCORE_HTTP_PORTS=5012
# The container branch in Program.cs binds the web client to this port.
EXPOSE 5012
ENTRYPOINT ["dotnet", "Nemera.Presentation.Web.dll"]
@@ -11,6 +11,8 @@
<ContainerRepository>nemera-web</ContainerRepository>
<DockerfileTag>nemera-web</DockerfileTag>
<DockerComposeProjectPath>..\docker-compose.dcproj</DockerComposeProjectPath>
<!-- The release restore sets this environment variable to restore every supported runtime in one pass. -->
<RuntimeIdentifiers Condition="'$(NEMERA_RELEASE_RUNTIME_IDENTIFIERS)' != ''">$(NEMERA_RELEASE_RUNTIME_IDENTIFIERS)</RuntimeIdentifiers>
</PropertyGroup>
<ItemGroup>
+12 -3
View File
@@ -1,8 +1,5 @@
#region ========================================================================= USING =====================================================================================
using FastEndpoints;
using Nemera.Presentation.Web.Common.DependencyInjection;
using Nemera.Presentation.Web.Common.HealthChecks;
using Nemera.Presentation.Web.Common.Utilities;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
using Microsoft.AspNetCore.Hosting;
@@ -11,6 +8,9 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Diagnostics.HealthChecks;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Primitives;
using Nemera.Presentation.Web.Common.DependencyInjection;
using Nemera.Presentation.Web.Common.HealthChecks;
using Nemera.Presentation.Web.Common.Utilities;
using Scalar.AspNetCore;
using Serilog;
using System;
@@ -50,7 +50,16 @@ public class Program
builder.WebHost.ConfigureKestrel(options => options.ListenAnyIP(5012)); // HTTP only.
}
else
{
logPath = Path.Combine(AppContext.BaseDirectory, "logs"); // Use local binary path.
// A published build used to fall back to the framework's port 5000. Keep the documented default only when the host
// did not provide an address or a port through configuration, including ASPNETCORE_URLS, ASPNETCORE_HTTP_PORTS
// and ASPNETCORE_HTTPS_PORTS.
if (string.IsNullOrWhiteSpace(builder.Configuration["Urls"])
&& string.IsNullOrWhiteSpace(builder.Configuration["HTTP_PORTS"])
&& string.IsNullOrWhiteSpace(builder.Configuration["HTTPS_PORTS"]))
builder.WebHost.UseUrls("http://localhost:5012");
}
Directory.CreateDirectory(logPath);
if (!logPath.EndsWith(Path.DirectorySeparatorChar.ToString()))
logPath = logPath += Path.DirectorySeparatorChar;