Files
Heimdall/docker/Dockerfile.central
T
Arnaud Dartois f5c4bcd5f0 feat(deploy): add heimdall-web Blazor UI service to Docker Compose
The Dockerfile.central already compiled Heimdall.Web but it was never
deployed as a service. Add heimdall-web service using the same image
with entrypoint overridden to dotnet web/Heimdall.Web.dll.

- Expose port 5001 for the Blazor Server UI
- API_BASE_URL points to heimdall-central:8080 for server-side HTTP calls
- Healthcheck on root / returns 200 once the Blazor circuit is ready
2026-07-18 20:44:38 +00:00

43 lines
1.4 KiB
Docker

FROM mcr.microsoft.com/dotnet/sdk:10.0-alpine AS build
WORKDIR /src
# Copy solution and project files
COPY *.slnx .
COPY Directory.Build.props .
COPY src/Heimdall.Domain.Primitives/*.csproj src/Heimdall.Domain.Primitives/
COPY src/Heimdall.Domain/*.csproj src/Heimdall.Domain/
COPY src/Heimdall.Application/*.csproj src/Heimdall.Application/
COPY src/Heimdall.Infrastructure/*.csproj src/Heimdall.Infrastructure/
COPY src/Heimdall.Api/*.csproj src/Heimdall.Api/
COPY src/Heimdall.Web/*.csproj src/Heimdall.Web/
COPY src/Heimdall.Workers/*.csproj src/Heimdall.Workers/
RUN dotnet restore src/Heimdall.Api/Heimdall.Api.csproj
RUN dotnet restore src/Heimdall.Web/Heimdall.Web.csproj
RUN dotnet restore src/Heimdall.Workers/Heimdall.Workers.csproj
# Copy all source
COPY src/ src/
# Build and publish API+Web combined container
RUN dotnet publish src/Heimdall.Api/Heimdall.Api.csproj -c Release -o /app/api
RUN dotnet publish src/Heimdall.Web/Heimdall.Web.csproj -c Release -o /app/web
RUN dotnet publish src/Heimdall.Workers/Heimdall.Workers.csproj -c Release -o /app/workers
FROM mcr.microsoft.com/dotnet/aspnet:10.0-alpine AS runtime
WORKDIR /app
RUN apk add --no-cache icu-libs libstdc++
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \
ASPNETCORE_URLS=http://+:8080
COPY --from=build /app/api ./api
COPY --from=build /app/web ./web
COPY --from=build /app/workers ./workers
# Expose both API and Web ports
EXPOSE 8080
ENTRYPOINT ["dotnet", "api/Heimdall.Api.dll"]