Skip to content

Commit 9e2c591

Browse files
authored
Merge pull request #15 from Programeerik/test-acceptance
Test acceptance
2 parents 2866056 + cdaaf89 commit 9e2c591

File tree

2 files changed

+9
-26
lines changed

2 files changed

+9
-26
lines changed
Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,20 @@
1-
# Base image with only runtime (for production)
2-
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
3-
WORKDIR /app
4-
EXPOSE 8080
5-
EXPOSE 8081
6-
7-
# Development stage with full .NET SDK for hot reload
81
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS dev
92
WORKDIR /app
10-
11-
# Copy only the project files first to leverage Docker cache
123
COPY ShowcaseFrontend/ShowcaseFrontend.csproj ShowcaseFrontend/
134
RUN dotnet restore ShowcaseFrontend/ShowcaseFrontend.csproj
14-
15-
# Copy the rest of the source code
165
COPY ShowcaseFrontend/. ShowcaseFrontend/
17-
186
WORKDIR /app/ShowcaseFrontend
19-
CMD ["dotnet", "watch", "run", "--project", "/app/ShowcaseFrontend/ShowcaseFrontend.csproj", "--no-launch-profile", "--urls=http://0.0.0.0:80"]
7+
CMD ["dotnet", "watch", "run", "--no-launch-profile", "--urls", "http://0.0.0.0:80"]
208

21-
# Build stage for production
229
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
2310
WORKDIR /src
24-
COPY ShowcaseProject/ShowcaseFrontend/ShowcaseFrontend.csproj ShowcaseFrontend/
25-
RUN dotnet restore "./ShowcaseFrontend/ShowcaseFrontend.csproj"
26-
COPY ShowcaseProject/ShowcaseFrontend/. ShowcaseFrontend/
27-
WORKDIR "/src/ShowcaseFrontend"
28-
RUN dotnet build "./ShowcaseFrontend.csproj" -c Release -o /app/build
29-
30-
# Publish stage
31-
FROM build AS publish
32-
RUN dotnet publish "./ShowcaseFrontend.csproj" -c Release -o /app/publish /p:UseAppHost=false
11+
COPY ShowcaseFrontend/ShowcaseFrontend.csproj ShowcaseFrontend/
12+
RUN dotnet restore ShowcaseFrontend/ShowcaseFrontend.csproj
13+
COPY ShowcaseFrontend/. ShowcaseFrontend/
14+
WORKDIR /src/ShowcaseFrontend
15+
RUN dotnet publish -c Release -o /app/publish /p:UseAppHost=false
3316

34-
# Final production stage
35-
FROM base AS final
17+
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final
3618
WORKDIR /app
37-
COPY --from=publish /app/publish .
19+
COPY --from=build /app/publish .
3820
ENTRYPOINT ["dotnet", "ShowcaseFrontend.dll"]

ShowcaseProject/ShowcaseFrontend/Views/Home/Index.cshtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<img class="person-logo" src="images/ErikL.jpg">
88
<h1 class="person-name">Erik Leusink</h1>
99
<h2>Over mijzelf</h2>
10+
<h3><b>Test voor acceptatie</b></h3>
1011
<p class="personalia-content__description">
1112
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.
1213
<p>

0 commit comments

Comments
 (0)