Initial commit

This commit is contained in:
2026-06-04 06:24:56 +02:00
commit 282f4864c4
111 changed files with 8083 additions and 0 deletions

27
MealPlan.Api/Dockerfile Normal file
View File

@@ -0,0 +1,27 @@
# ---------- Build stage ----------
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
# Restore first to leverage Docker layer caching.
COPY ["MealPlan.Api.csproj", "./"]
RUN dotnet restore "MealPlan.Api.csproj"
COPY . .
RUN dotnet publish "MealPlan.Api.csproj" -c Release -o /app/publish /p:UseAppHost=false
# ---------- Runtime stage ----------
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final
WORKDIR /app
# Run as the non-root user shipped in the aspnet image.
USER $APP_UID
ENV ASPNETCORE_URLS=http://+:5000 \
ASPNETCORE_ENVIRONMENT=Production \
DOTNET_RUNNING_IN_CONTAINER=true
EXPOSE 5000
COPY --from=build /app/publish .
ENTRYPOINT ["dotnet", "MealPlan.Api.dll"]