Files
BackOffice.BFF/src/BackOffice.BFF.WebApi/Dockerfile
T
masoodafar-web 3219d07dea
Build and Deploy / build (push) Failing after 5s
chore: تنظیم Nexus برای NuGet و Docker offline
- Dockerfile: استفاده از Nexus Docker (194.5.195.53:32082)
- NuGet.config: استفاده از Nexus NuGet با HTTP و allowInsecureConnections
- workflow: حذف kubectl dependency، اضافه کردن 32082 به insecure-registries
- csproj: تغییر push آدرس به Nexus foursat-nuget-hosted
2026-01-29 02:56:26 +03:30

45 lines
3.5 KiB
Docker

FROM 194.5.195.53:32082/dotnet/aspnet:9.0 AS base
USER $APP_UID
WORKDATA /app
EXPOSE 8080
EXPOSE 8081
FROM 194.5.195.53:32082/dotnet/sdk:9.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["BackOffice.BFF.WebApi/NuGet.config", "NuGet.config"]
COPY ["BackOffice.BFF.WebApi/BackOffice.BFF.WebApi.csproj", "BackOffice.BFF.WebApi/"]
COPY ["Protobufs/BackOffice.BFF.Commission.Protobuf/BackOffice.BFF.Commission.Protobuf.csproj", "Protobufs/BackOffice.BFF.Commission.Protobuf/"]
COPY ["Protobufs/BackOffice.BFF.Common.Protobuf/BackOffice.BFF.Common.Protobuf.csproj", "Protobufs/BackOffice.BFF.Common.Protobuf/"]
COPY ["BackOffice.BFF.Application/BackOffice.BFF.Application.csproj", "BackOffice.BFF.Application/"]
COPY ["Protobufs/BackOffice.BFF.UserOrder.Protobuf/BackOffice.BFF.UserOrder.Protobuf.csproj", "Protobufs/BackOffice.BFF.UserOrder.Protobuf/"]
COPY ["BackOffice.BFF.Domain/BackOffice.BFF.Domain.csproj", "BackOffice.BFF.Domain/"]
COPY ["Protobufs/BackOffice.BFF.Package.Protobuf/BackOffice.BFF.Package.Protobuf.csproj", "Protobufs/BackOffice.BFF.Package.Protobuf/"]
COPY ["Protobufs/BackOffice.BFF.NetworkMembership.Protobuf/BackOffice.BFF.NetworkMembership.Protobuf.csproj", "Protobufs/BackOffice.BFF.NetworkMembership.Protobuf/"]
COPY ["Protobufs/BackOffice.BFF.ClubMembership.Protobuf/BackOffice.BFF.ClubMembership.Protobuf.csproj", "Protobufs/BackOffice.BFF.ClubMembership.Protobuf/"]
COPY ["Protobufs/BackOffice.BFF.PublicMessage.Protobuf/BackOffice.BFF.PublicMessage.Protobuf.csproj", "Protobufs/BackOffice.BFF.PublicMessage.Protobuf/"]
COPY ["Protobufs/BackOffice.BFF.Health.Protobuf/BackOffice.BFF.Health.Protobuf.csproj", "Protobufs/BackOffice.BFF.Health.Protobuf/"]
COPY ["Protobufs/BackOffice.BFF.Configuration.Protobuf/BackOffice.BFF.Configuration.Protobuf.csproj", "Protobufs/BackOffice.BFF.Configuration.Protobuf/"]
COPY ["BackOffice.BFF.Infrastructure/BackOffice.BFF.Infrastructure.csproj", "BackOffice.BFF.Infrastructure/"]
COPY ["Protobufs/BackOffice.BFF.Otp.Protobuf/BackOffice.BFF.Otp.Protobuf.csproj", "Protobufs/BackOffice.BFF.Otp.Protobuf/"]
COPY ["Protobufs/BackOffice.BFF.User.Protobuf/BackOffice.BFF.User.Protobuf.csproj", "Protobufs/BackOffice.BFF.User.Protobuf/"]
COPY ["Protobufs/BackOffice.BFF.UserAddress.Protobuf/BackOffice.BFF.UserAddress.Protobuf.csproj", "Protobufs/BackOffice.BFF.UserAddress.Protobuf/"]
COPY ["Protobufs/BackOffice.BFF.Products.Protobuf/BackOffice.BFF.Products.Protobuf.csproj", "Protobufs/BackOffice.BFF.Products.Protobuf/"]
COPY ["Protobufs/BackOffice.BFF.Role.Protobuf/BackOffice.BFF.Role.Protobuf.csproj", "Protobufs/BackOffice.BFF.Role.Protobuf/"]
COPY ["Protobufs/BackOffice.BFF.UserRole.Protobuf/BackOffice.BFF.UserRole.Protobuf.csproj", "Protobufs/BackOffice.BFF.UserRole.Protobuf/"]
COPY ["Protobufs/BackOffice.BFF.Category.Protobuf/BackOffice.BFF.Category.Protobuf.csproj", "Protobufs/BackOffice.BFF.Category.Protobuf/"]
COPY ["Protobufs/BackOffice.BFF.ManualPayment.Protobuf/BackOffice.BFF.ManualPayment.Protobuf.csproj", "Protobufs/BackOffice.BFF.ManualPayment.Protobuf/"]
RUN dotnet restore "BackOffice.BFF.WebApi/BackOffice.BFF.WebApi.csproj" --configfile NuGet.config
COPY . .
WORKDIR "/src/BackOffice.BFF.WebApi"
RUN dotnet build "./BackOffice.BFF.WebApi.csproj" -c $BUILD_CONFIGURATION -o /app/build
FROM build AS publish
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "./BackOffice.BFF.WebApi.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "BackOffice.BFF.WebApi.dll"]