Compare commits
8
Commits
98f46b5e13
...
1.5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c36ff28a84 | ||
|
|
5c0d8430f6 | ||
|
|
0c24613dd3 | ||
|
|
3b74138e9c | ||
|
|
8bcd0f60c3 | ||
|
|
ccf49d79fc | ||
|
|
186c4b1e85 | ||
|
|
359e50704a |
+4
-4
@@ -7,14 +7,14 @@ steps:
|
||||
- name: dotnet-build
|
||||
image: mcr.microsoft.com/dotnet/sdk:10.0
|
||||
commands:
|
||||
- dotnet restore LiteCharms.slnx
|
||||
- dotnet build LiteCharms.slnx -c Release
|
||||
- dotnet restore LiteCharmsShop.slnx
|
||||
- dotnet build LiteCharmsShop.slnx -c Release
|
||||
|
||||
- name: dotnet-test
|
||||
image: mcr.microsoft.com/dotnet/sdk:10.0
|
||||
commands:
|
||||
- dotnet restore LiteCharms.slnx
|
||||
- dotnet test LiteCharms.slnx -c Release --no-restore
|
||||
- dotnet restore LiteCharmsShop.slnx
|
||||
- dotnet test LiteCharmsShop.slnx -c Release --no-restore
|
||||
|
||||
trigger:
|
||||
event: [ pull_request ]
|
||||
|
||||
+3
-8
@@ -2,24 +2,19 @@
|
||||
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
||||
WORKDIR /app
|
||||
|
||||
COPY ["../nuget.config", "./"]
|
||||
COPY ["../Shop/Shop.csproj", "Shop/"]
|
||||
COPY ["nuget.config", "./"]
|
||||
COPY ["Shop/Shop.csproj", "Shop/"]
|
||||
RUN dotnet restore "Shop/Shop.csproj" --configfile nuget.config
|
||||
COPY . .
|
||||
RUN dotnet publish "../Shop/Shop.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
||||
RUN dotnet publish "Shop/Shop.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
||||
|
||||
# Stage 2: Final Image
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS final
|
||||
WORKDIR /app
|
||||
RUN addgroup --system --gid 1000 appgroup && \
|
||||
adduser --system --uid 1000 --ingroup appgroup appuser
|
||||
|
||||
EXPOSE 8080
|
||||
EXPOSE 8081
|
||||
|
||||
COPY --from=build /app/publish .
|
||||
|
||||
RUN chown -R appuser:appgroup /app
|
||||
USER appuser
|
||||
|
||||
ENTRYPOINT ["dotnet", "Shop.dll"]
|
||||
Reference in New Issue
Block a user