From 6fcd564824c726b33ed26605e257f849bd23acf6 Mon Sep 17 00:00:00 2001 From: programeerik Date: Thu, 4 Sep 2025 15:02:18 +0200 Subject: [PATCH 1/4] test acceptance --- ShowcaseProject/ShowcaseFrontend/Views/Home/Index.cshtml | 1 + 1 file changed, 1 insertion(+) diff --git a/ShowcaseProject/ShowcaseFrontend/Views/Home/Index.cshtml b/ShowcaseProject/ShowcaseFrontend/Views/Home/Index.cshtml index 6b4d281..5e1cbfb 100644 --- a/ShowcaseProject/ShowcaseFrontend/Views/Home/Index.cshtml +++ b/ShowcaseProject/ShowcaseFrontend/Views/Home/Index.cshtml @@ -7,6 +7,7 @@

Erik Leusink

Over mijzelf

+

Test voor acceptatie

Enthousiaste afgestudeerde Media- en Applicatie ontwikkelaar en 24 jaar oud. Op dit moment studeer ik aan het Windesheim College te Zwolle, hier volg ik de opleiding HBO ICT, met als afstudeer richting Software Engineering.

From c943d4127a5b6c85eeeaaab1585a03618a2393df Mon Sep 17 00:00:00 2001 From: programeerik Date: Thu, 4 Sep 2025 15:11:03 +0200 Subject: [PATCH 2/4] test2 --- ShowcaseProject/ShowcaseFrontend/Dockerfile | 34 +++++++++------------ 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/ShowcaseProject/ShowcaseFrontend/Dockerfile b/ShowcaseProject/ShowcaseFrontend/Dockerfile index 3513adf..1769002 100644 --- a/ShowcaseProject/ShowcaseFrontend/Dockerfile +++ b/ShowcaseProject/ShowcaseFrontend/Dockerfile @@ -1,38 +1,32 @@ -# Base image with only runtime (for production) FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base WORKDIR /app EXPOSE 8080 EXPOSE 8081 -# Development stage with full .NET SDK for hot reload +# Dev (hot reload) FROM mcr.microsoft.com/dotnet/sdk:8.0 AS dev WORKDIR /app +COPY ShowcaseProject/ShowcaseFrontend/ShowcaseFrontend.csproj ShowcaseProject/ShowcaseFrontend/ +RUN dotnet restore ShowcaseProject/ShowcaseFrontend/ShowcaseFrontend.csproj +COPY ShowcaseProject/ShowcaseFrontend/. ShowcaseProject/ShowcaseFrontend/ +WORKDIR /app/ShowcaseProject/ShowcaseFrontend +CMD ["dotnet","watch","run","--project","/app/ShowcaseProject/ShowcaseFrontend/ShowcaseFrontend.csproj","--no-launch-profile","--urls=http://0.0.0.0:80"] -# Copy only the project files first to leverage Docker cache -COPY ShowcaseFrontend/ShowcaseFrontend.csproj ShowcaseFrontend/ -RUN dotnet restore ShowcaseFrontend/ShowcaseFrontend.csproj - -# Copy the rest of the source code -COPY ShowcaseFrontend/. ShowcaseFrontend/ - -WORKDIR /app/ShowcaseFrontend -CMD ["dotnet", "watch", "run", "--project", "/app/ShowcaseFrontend/ShowcaseFrontend.csproj", "--no-launch-profile", "--urls=http://0.0.0.0:80"] - -# Build stage for production +# Build FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build WORKDIR /src COPY ShowcaseProject/ShowcaseFrontend/ShowcaseFrontend.csproj ShowcaseFrontend/ -RUN dotnet restore "./ShowcaseFrontend/ShowcaseFrontend.csproj" +RUN dotnet restore ShowcaseFrontend/ShowcaseFrontend.csproj COPY ShowcaseProject/ShowcaseFrontend/. ShowcaseFrontend/ -WORKDIR "/src/ShowcaseFrontend" -RUN dotnet build "./ShowcaseFrontend.csproj" -c Release -o /app/build +WORKDIR /src/ShowcaseFrontend +RUN dotnet build ShowcaseFrontend.csproj -c Release -o /app/build -# Publish stage +# Publish FROM build AS publish -RUN dotnet publish "./ShowcaseFrontend.csproj" -c Release -o /app/publish /p:UseAppHost=false +RUN dotnet publish ShowcaseFrontend.csproj -c Release -o /app/publish /p:UseAppHost=false -# Final production stage +# Final FROM base AS final WORKDIR /app COPY --from=publish /app/publish . -ENTRYPOINT ["dotnet", "ShowcaseFrontend.dll"] +ENTRYPOINT ["dotnet","ShowcaseFrontend.dll"] From e5dd2f7216f466e5685d6c0b07c4fc4e5b45b507 Mon Sep 17 00:00:00 2001 From: programeerik Date: Thu, 4 Sep 2025 16:16:14 +0200 Subject: [PATCH 3/4] simpler dockerfile --- ShowcaseProject/ShowcaseFrontend/Dockerfile | 34 +++++++-------------- 1 file changed, 11 insertions(+), 23 deletions(-) diff --git a/ShowcaseProject/ShowcaseFrontend/Dockerfile b/ShowcaseProject/ShowcaseFrontend/Dockerfile index 1769002..4611140 100644 --- a/ShowcaseProject/ShowcaseFrontend/Dockerfile +++ b/ShowcaseProject/ShowcaseFrontend/Dockerfile @@ -1,32 +1,20 @@ -FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base -WORKDIR /app -EXPOSE 8080 -EXPOSE 8081 - -# Dev (hot reload) FROM mcr.microsoft.com/dotnet/sdk:8.0 AS dev WORKDIR /app -COPY ShowcaseProject/ShowcaseFrontend/ShowcaseFrontend.csproj ShowcaseProject/ShowcaseFrontend/ -RUN dotnet restore ShowcaseProject/ShowcaseFrontend/ShowcaseFrontend.csproj -COPY ShowcaseProject/ShowcaseFrontend/. ShowcaseProject/ShowcaseFrontend/ -WORKDIR /app/ShowcaseProject/ShowcaseFrontend -CMD ["dotnet","watch","run","--project","/app/ShowcaseProject/ShowcaseFrontend/ShowcaseFrontend.csproj","--no-launch-profile","--urls=http://0.0.0.0:80"] +COPY ShowcaseFrontend/ShowcaseFrontend.csproj ShowcaseFrontend/ +RUN dotnet restore ShowcaseFrontend/ShowcaseFrontend.csproj +COPY ShowcaseFrontend/. ShowcaseFrontend/ +WORKDIR /app/ShowcaseFrontend +CMD ["dotnet", "watch", "run", "--no-launch-profile", "--urls", "http://0.0.0.0:80"] -# Build FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build WORKDIR /src -COPY ShowcaseProject/ShowcaseFrontend/ShowcaseFrontend.csproj ShowcaseFrontend/ +COPY ShowcaseFrontend/ShowcaseFrontend.csproj ShowcaseFrontend/ RUN dotnet restore ShowcaseFrontend/ShowcaseFrontend.csproj -COPY ShowcaseProject/ShowcaseFrontend/. ShowcaseFrontend/ +COPY ShowcaseFrontend/. ShowcaseFrontend/ WORKDIR /src/ShowcaseFrontend -RUN dotnet build ShowcaseFrontend.csproj -c Release -o /app/build - -# Publish -FROM build AS publish -RUN dotnet publish ShowcaseFrontend.csproj -c Release -o /app/publish /p:UseAppHost=false +RUN dotnet publish -c Release -o /app/publish /p:UseAppHost=false -# Final -FROM base AS final +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final WORKDIR /app -COPY --from=publish /app/publish . -ENTRYPOINT ["dotnet","ShowcaseFrontend.dll"] +COPY --from=build /app/publish . +ENTRYPOINT ["dotnet", "ShowcaseFrontend.dll"] From cdaaf89e26aefaf73b2a1048391ba6bb527993de Mon Sep 17 00:00:00 2001 From: programeerik Date: Thu, 4 Sep 2025 16:19:34 +0200 Subject: [PATCH 4/4] test voor acceptatie --- ShowcaseProject/ShowcaseFrontend/Views/Home/Index.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ShowcaseProject/ShowcaseFrontend/Views/Home/Index.cshtml b/ShowcaseProject/ShowcaseFrontend/Views/Home/Index.cshtml index 5e1cbfb..962d505 100644 --- a/ShowcaseProject/ShowcaseFrontend/Views/Home/Index.cshtml +++ b/ShowcaseProject/ShowcaseFrontend/Views/Home/Index.cshtml @@ -7,7 +7,7 @@

Erik Leusink

Over mijzelf

-

Test voor acceptatie

+

Test voor acceptatie

Enthousiaste afgestudeerde Media- en Applicatie ontwikkelaar en 24 jaar oud. Op dit moment studeer ik aan het Windesheim College te Zwolle, hier volg ik de opleiding HBO ICT, met als afstudeer richting Software Engineering.