48a7f5a825
Five-project Clean Architecture solution (Core/Infrastructure/App + Core.Tests/ Integration.Tests) on .NET 10 with central package management, snake_case EF mapping, and shared build/style config. - Full domain entity set + EF DbContext for the SDD §5.3 schema (singular table names). - InitialSchema migration (relational) + TimescaleHypertables migration (raw SQL: create_hypertable + compression on reading, hypertable on consumption). - App wiring: Serilog (actually wired, unlike MQTTower), DbContext, migrate-on-startup, /healthz. Serves plain HTTP behind a reverse proxy (no HTTPS redirect). - deploy/Dockerfile (2-stage, ICU-capable) + docker-compose (app + timescaledb). - Integration.Tests: shared TimescaleFixture (Testcontainers) — migrations, hypertables, compression policy, and /healthz all verified green (4/4). Claude-Session: https://claude.ai/code/session_01WujdMtMJPbxDpDnMeK22rr
31 lines
1.2 KiB
Docker
31 lines
1.2 KiB
Docker
# syntax=docker/dockerfile:1
|
|
# Build context is the repository root (see docker-compose.yml: context: ..).
|
|
|
|
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
|
WORKDIR /src
|
|
|
|
# Restore first (layer-cached on lockfile-ish inputs).
|
|
COPY Directory.Build.props Directory.Packages.props global.json ./
|
|
COPY src/Core/MeterVault.Core.csproj src/Core/
|
|
COPY src/Infrastructure/MeterVault.Infrastructure.csproj src/Infrastructure/
|
|
COPY src/App/MeterVault.App.csproj src/App/
|
|
RUN dotnet restore src/App/MeterVault.App.csproj
|
|
|
|
# Build & publish.
|
|
COPY src/ ./src/
|
|
RUN dotnet publish src/App/MeterVault.App.csproj -c Release -o /app/publish /p:UseAppHost=false
|
|
|
|
# Debian-based runtime (keeps full ICU — required by the de-DE CSV importer; do not use
|
|
# an invariant-globalization or chiselled image that strips ICU).
|
|
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS runtime
|
|
WORKDIR /app
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends curl \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
COPY --from=build /app/publish ./
|
|
ENV ASPNETCORE_URLS=http://+:8080 \
|
|
ASPNETCORE_ENVIRONMENT=Production \
|
|
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
|
|
EXPOSE 8080
|
|
ENTRYPOINT ["dotnet", "MeterVault.App.dll"]
|