Initial commit

This commit is contained in:
Kevin Harlay
2026-09-07 13:33:22 +02:00
commit ebfaf6f5ec
295 changed files with 8786 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
# Stage build
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
COPY ["ExpenseTracker.Api.csproj", "."]
RUN dotnet restore
COPY . .
RUN dotnet publish -c Release -o /app/publish --no-restore
# Stage runtime
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime
WORKDIR /app
RUN addgroup --gid 1001 appgroup && adduser --uid 1001 --ingroup appgroup --disabled-password --no-create-home appuser
COPY --from=build --chown=appuser:appgroup /app/publish .
USER 1001
EXPOSE 5000
# ASPNETCORE_URLS overrides the UseUrls("http://127.0.0.1:5000") in Program.cs
# so Kestrel binds on all container interfaces (needed for Docker networking).
# This is NOT a public 0.0.0.0 binding — the container port is not exposed to the host.
ENV ASPNETCORE_URLS=http://+:5000
ENTRYPOINT ["dotnet", "ExpenseTracker.Api.dll"]