Complete MVP implementation (Étape 1) covering: - Domain: primitives (Entity<TId>, ValueObject), 10 entities, 6 enums - EF Core: AppDbContext + Identity, 8 EntityTypeConfigurations, audit/soft-delete interceptors, initial migration - Application: service interfaces, DTOs, FluentValidation, ServiceResult pattern - Security: Identity + JWT + API Key multi-auth, role-based permissions, constant-time key validation - API: Auth/Sites/Agents controllers with explicit auth scheme policies - Workers: Hangfire PostgreSQL setup with schema isolation, HeartbeatMonitorJob - Agent: registration service + 30s heartbeat loop - Docker: multi-stage Dockerfiles for central + agent, docker-compose.yml - CI/CD: GitHub Actions pipeline with build+test and Docker build - Tests: 13 domain tests (Site, Agent, Camera entities) Architecture decisions per deliberation council: - API Key via AuthenticationHandler<T> (not middleware) - Explicit [Authorize(AuthenticationSchemes)] on all endpoints - Event/Recording/Person/Vehicle deferred from initial migration - Hangfire compatible with .NET 10 (v1.8.17)
29 lines
895 B
Docker
29 lines
895 B
Docker
FROM mcr.microsoft.com/dotnet/sdk:10.0-alpine AS build
|
|
WORKDIR /src
|
|
|
|
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.Contracts/*.csproj src/Heimdall.Contracts/
|
|
COPY src/Heimdall.Application/*.csproj src/Heimdall.Application/
|
|
COPY src/Heimdall.Infrastructure/*.csproj src/Heimdall.Infrastructure/
|
|
COPY src/Heimdall.Agent/*.csproj src/Heimdall.Agent/
|
|
|
|
RUN dotnet restore src/Heimdall.Agent/Heimdall.Agent.csproj
|
|
|
|
COPY src/ src/
|
|
|
|
RUN dotnet publish src/Heimdall.Agent/Heimdall.Agent.csproj -c Release -o /app
|
|
|
|
FROM mcr.microsoft.com/dotnet/aspnet:10.0-alpine AS runtime
|
|
WORKDIR /app
|
|
|
|
RUN apk add --no-cache icu-libs libstdc++ ffmpeg
|
|
|
|
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
|
|
|
|
COPY --from=build /app .
|
|
|
|
ENTRYPOINT ["dotnet", "Heimdall.Agent.dll"]
|