Même bug que les intégrations : storage.s3.accessKey/secretKey en camelCase ne matchaient pas les clés lowercase en base → re-Add à chaque démarrage → violation IX_app_settings_key → crash loop (exit 139).
48 lines
1.6 KiB
Docker
48 lines
1.6 KiB
Docker
# ─── Heimdall — Single image (Web API + Blazor UI + Background Jobs) ──
|
|
# This image runs the combined Heimdall.Web process which serves:
|
|
# - Blazor UI (interactive Server)
|
|
# - REST API controllers
|
|
# - Hangfire background jobs (heartbeat monitor, agent failover)
|
|
# - SignalR hubs (config, events)
|
|
#
|
|
# Build: docker build -f docker/Dockerfile -t heimdall .
|
|
# Run: docker compose -f docker/docker-compose.yml up -d
|
|
|
|
FROM mcr.microsoft.com/dotnet/sdk:10.0-alpine AS build
|
|
WORKDIR /src
|
|
|
|
# Version injectée par la CI (GitVersion) — ex. docker build --build-arg VERSION=1.0.0
|
|
ARG VERSION=0.0.0-local
|
|
|
|
# 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.Web/*.csproj src/Heimdall.Web/
|
|
|
|
RUN dotnet restore src/Heimdall.Web/Heimdall.Web.csproj
|
|
|
|
# Copy all source
|
|
COPY src/ src/
|
|
|
|
# Build and publish — the Web project now includes Web UI, REST API, and background jobs
|
|
RUN dotnet publish src/Heimdall.Web/Heimdall.Web.csproj -c Release -o /app -p:Version=$VERSION
|
|
|
|
FROM mcr.microsoft.com/dotnet/aspnet:10.0-alpine AS runtime
|
|
WORKDIR /app
|
|
|
|
RUN apk add --no-cache icu-libs libstdc++ tzdata krb5
|
|
|
|
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \
|
|
ASPNETCORE_URLS=http://+:8080
|
|
|
|
COPY --from=build /app .
|
|
COPY --from=build /app/wwwroot ./wwwroot
|
|
|
|
EXPOSE 8080
|
|
|
|
ENTRYPOINT ["dotnet", "Heimdall.Web.dll"]
|