diff --git a/ShowcaseProject/ShowcaseFrontend/Dockerfile b/ShowcaseProject/ShowcaseFrontend/Dockerfile index 3513adf..4611140 100644 --- a/ShowcaseProject/ShowcaseFrontend/Dockerfile +++ b/ShowcaseProject/ShowcaseFrontend/Dockerfile @@ -1,38 +1,20 @@ -# 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 FROM mcr.microsoft.com/dotnet/sdk:8.0 AS dev WORKDIR /app - -# 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"] +CMD ["dotnet", "watch", "run", "--no-launch-profile", "--urls", "http://0.0.0.0:80"] -# Build stage for production FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build WORKDIR /src -COPY ShowcaseProject/ShowcaseFrontend/ShowcaseFrontend.csproj ShowcaseFrontend/ -RUN dotnet restore "./ShowcaseFrontend/ShowcaseFrontend.csproj" -COPY ShowcaseProject/ShowcaseFrontend/. ShowcaseFrontend/ -WORKDIR "/src/ShowcaseFrontend" -RUN dotnet build "./ShowcaseFrontend.csproj" -c Release -o /app/build - -# Publish stage -FROM build AS publish -RUN dotnet publish "./ShowcaseFrontend.csproj" -c Release -o /app/publish /p:UseAppHost=false +COPY ShowcaseFrontend/ShowcaseFrontend.csproj ShowcaseFrontend/ +RUN dotnet restore ShowcaseFrontend/ShowcaseFrontend.csproj +COPY ShowcaseFrontend/. ShowcaseFrontend/ +WORKDIR /src/ShowcaseFrontend +RUN dotnet publish -c Release -o /app/publish /p:UseAppHost=false -# Final production stage -FROM base AS final +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final WORKDIR /app -COPY --from=publish /app/publish . +COPY --from=build /app/publish . ENTRYPOINT ["dotnet", "ShowcaseFrontend.dll"] diff --git a/ShowcaseProject/ShowcaseFrontend/Views/Home/Index.cshtml b/ShowcaseProject/ShowcaseFrontend/Views/Home/Index.cshtml index 6b4d281..962d505 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.