Add Kubernetes CI/CD pipeline for kub-stage

This commit is contained in:
masoud
2025-12-05 16:25:14 +00:00
parent 67b43fea7a
commit 5e7e007b61
2 changed files with 42 additions and 0 deletions

15
Dockerfile Normal file
View File

@@ -0,0 +1,15 @@
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
WORKDIR /src
COPY src/*.sln ./ 2>/dev/null || true
COPY src/*/*.csproj ./
RUN for file in *.csproj; do mkdir -p "${file%.*}" && mv "$file" "${file%.*}/"; done 2>/dev/null || true
RUN dotnet restore "BackOffice.BFF/BackOffice.BFF.csproj" || dotnet restore
COPY src/ ./
RUN dotnet publish "BackOffice.BFF/BackOffice.BFF.csproj" -c Release -o /app/publish
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS runtime
WORKDIR /app
COPY --from=build /app/publish .
ENV ASPNETCORE_URLS=http://+:8080
EXPOSE 8080
ENTRYPOINT ["dotnet", "BackOffice.BFF.dll"]