|
1 | 1 | FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base |
2 | | - |
3 | 2 | WORKDIR /app |
4 | | -ENV ASPNETCORE_FORWARDEDHEADERS_ENABLED=true |
5 | | - |
6 | 3 | EXPOSE 8080 |
7 | 4 |
|
8 | | -FROM node:18.15.0-alpine AS angularBuild |
| 5 | +ENV ASPNETCORE_FORWARDEDHEADERS_ENABLED=true |
9 | 6 |
|
| 7 | +FROM node:18.15.0-alpine AS angularBuild |
10 | 8 | WORKDIR /angular |
11 | | - |
12 | 9 | COPY ["authorization/EventTriangle.Client/package.json", "EventTriangle.Client/"] |
13 | | - |
14 | 10 | COPY ["authorization/EventTriangle.Client/package-lock.json", "EventTriangle.Client/"] |
15 | | - |
16 | 11 | WORKDIR "EventTriangle.Client" |
17 | | - |
18 | 12 | RUN npm ci |
19 | | - |
20 | 13 | WORKDIR /angular |
21 | | - |
22 | 14 | COPY ["authorization/EventTriangle.Client", "EventTriangle.Client/"] |
23 | | - |
| 15 | +RUN npm install -g @angular/cli@15.2.7 |
24 | 16 | WORKDIR "EventTriangle.Client" |
25 | | - |
26 | 17 | ARG FRONT_API_URL |
27 | | - |
28 | 18 | RUN sed -i "s|https://localhost:7000/|$FRONT_API_URL|" ./src/assets/config/config.json |
29 | | - |
30 | 19 | RUN ng build --output-path "dist/client" |
31 | 20 |
|
32 | 21 | FROM mcr.microsoft.com/dotnet/sdk:10.0 AS publish |
33 | | - |
34 | 22 | WORKDIR /src |
35 | | - |
36 | 23 | COPY ["authorization/EventTriangleAPI.Authorization.BusinessLogic/EventTriangleAPI.Authorization.BusinessLogic.csproj", "authorization/EventTriangleAPI.Authorization.BusinessLogic/"] |
37 | 24 | COPY ["authorization/EventTriangleAPI.Authorization.Domain/EventTriangleAPI.Authorization.Domain.csproj", "authorization/EventTriangleAPI.Authorization.Domain/"] |
38 | 25 | COPY ["authorization/EventTriangleAPI.Authorization.Persistence/EventTriangleAPI.Authorization.Persistence.csproj", "authorization/EventTriangleAPI.Authorization.Persistence/"] |
39 | 26 | COPY ["authorization/EventTriangleAPI.Authorization.Presentation/EventTriangleAPI.Authorization.Presentation.csproj", "authorization/EventTriangleAPI.Authorization.Presentation/"] |
| 27 | +COPY ["authorization/EventTriangleAPI.Authorization.UnitTests/EventTriangleAPI.Authorization.UnitTests.csproj", "authorization/EventTriangleAPI.Authorization.UnitTests/"] |
40 | 28 | COPY ["shared/EventTriangleAPI.Shared.Application/EventTriangleAPI.Shared.Application.csproj", "shared/EventTriangleAPI.Shared.Application/"] |
41 | 29 | COPY ["shared/EventTriangleAPI.Shared.DTO/EventTriangleAPI.Shared.DTO.csproj", "shared/EventTriangleAPI.Shared.DTO/"] |
42 | | - |
43 | 30 | RUN dotnet restore "authorization/EventTriangleAPI.Authorization.Presentation/EventTriangleAPI.Authorization.Presentation.csproj" |
44 | | - |
45 | 31 | COPY . . |
46 | | - |
47 | 32 | WORKDIR "authorization/EventTriangleAPI.Authorization.Presentation" |
48 | | - |
49 | 33 | ARG VERSION |
50 | | - |
51 | | -RUN dotnet publish "EventTriangleAPI.Authorization.Presentation.csproj" -c Release -p:Version=$VERSION -o /app/publish /p:UseAppHost=false |
| 34 | +RUN dotnet publish "EventTriangleAPI.Authorization.Presentation.csproj" -c Release -p:Version=$VERSION -o /app/publish /p:UseAppHost=false --no-cache |
52 | 35 |
|
53 | 36 | FROM base AS final |
54 | 37 | WORKDIR /app |
55 | | - |
56 | 38 | COPY --from=publish /app/publish . |
57 | | - |
58 | 39 | COPY --from=angularBuild "/angular/EventTriangle.Client/dist/client" wwwroot |
59 | | - |
60 | 40 | ENTRYPOINT ["dotnet", "EventTriangleAPI.Authorization.Presentation.dll"] |
0 commit comments