Files
BackOffice.BFF/Dockerfile

47 lines
3.3 KiB
Docker
Raw Normal View History

FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
WORKDIR /src
2025-12-05 22:00:12 +00:00
COPY src/BackOffice.BFF.sln ./
COPY src/BackOffice.BFF.WebApi/*.csproj ./BackOffice.BFF.WebApi/
COPY src/BackOffice.BFF.Application/*.csproj ./BackOffice.BFF.Application/
COPY src/BackOffice.BFF.Infrastructure/*.csproj ./BackOffice.BFF.Infrastructure/
COPY src/BackOffice.BFF.Domain/*.csproj ./BackOffice.BFF.Domain/
COPY src/Protobufs/BackOffice.BFF.Category.Protobuf/*.csproj ./Protobufs/BackOffice.BFF.Category.Protobuf/
2025-12-05 22:00:12 +00:00
COPY src/Protobufs/BackOffice.BFF.ClubMembership.Protobuf/*.csproj ./Protobufs/BackOffice.BFF.ClubMembership.Protobuf/
COPY src/Protobufs/BackOffice.BFF.Commission.Protobuf/*.csproj ./Protobufs/BackOffice.BFF.Commission.Protobuf/
COPY src/Protobufs/BackOffice.BFF.Common.Protobuf/*.csproj ./Protobufs/BackOffice.BFF.Common.Protobuf/
COPY src/Protobufs/BackOffice.BFF.Configuration.Protobuf/*.csproj ./Protobufs/BackOffice.BFF.Configuration.Protobuf/
COPY src/Protobufs/BackOffice.BFF.DiscountCategory.Protobuf/*.csproj ./Protobufs/BackOffice.BFF.DiscountCategory.Protobuf/
COPY src/Protobufs/BackOffice.BFF.DiscountOrder.Protobuf/*.csproj ./Protobufs/BackOffice.BFF.DiscountOrder.Protobuf/
COPY src/Protobufs/BackOffice.BFF.DiscountProduct.Protobuf/*.csproj ./Protobufs/BackOffice.BFF.DiscountProduct.Protobuf/
COPY src/Protobufs/BackOffice.BFF.DiscountShoppingCart.Protobuf/*.csproj ./Protobufs/BackOffice.BFF.DiscountShoppingCart.Protobuf/
COPY src/Protobufs/BackOffice.BFF.Health.Protobuf/*.csproj ./Protobufs/BackOffice.BFF.Health.Protobuf/
COPY src/Protobufs/BackOffice.BFF.ManualPayment.Protobuf/*.csproj ./Protobufs/BackOffice.BFF.ManualPayment.Protobuf/
COPY src/Protobufs/BackOffice.BFF.NetworkMembership.Protobuf/*.csproj ./Protobufs/BackOffice.BFF.NetworkMembership.Protobuf/
COPY src/Protobufs/BackOffice.BFF.Otp.Protobuf/*.csproj ./Protobufs/BackOffice.BFF.Otp.Protobuf/
COPY src/Protobufs/BackOffice.BFF.Package.Protobuf/*.csproj ./Protobufs/BackOffice.BFF.Package.Protobuf/
COPY src/Protobufs/BackOffice.BFF.ProductTag.Protobuf/*.csproj ./Protobufs/BackOffice.BFF.ProductTag.Protobuf/
COPY src/Protobufs/BackOffice.BFF.Products.Protobuf/*.csproj ./Protobufs/BackOffice.BFF.Products.Protobuf/
COPY src/Protobufs/BackOffice.BFF.PublicMessage.Protobuf/*.csproj ./Protobufs/BackOffice.BFF.PublicMessage.Protobuf/
COPY src/Protobufs/BackOffice.BFF.Role.Protobuf/*.csproj ./Protobufs/BackOffice.BFF.Role.Protobuf/
COPY src/Protobufs/BackOffice.BFF.Tag.Protobuf/*.csproj ./Protobufs/BackOffice.BFF.Tag.Protobuf/
COPY src/Protobufs/BackOffice.BFF.User.Protobuf/*.csproj ./Protobufs/BackOffice.BFF.User.Protobuf/
COPY src/Protobufs/BackOffice.BFF.UserAddress.Protobuf/*.csproj ./Protobufs/BackOffice.BFF.UserAddress.Protobuf/
COPY src/Protobufs/BackOffice.BFF.UserOrder.Protobuf/*.csproj ./Protobufs/BackOffice.BFF.UserOrder.Protobuf/
COPY src/Protobufs/BackOffice.BFF.UserRole.Protobuf/*.csproj ./Protobufs/BackOffice.BFF.UserRole.Protobuf/
RUN dotnet restore "BackOffice.BFF.WebApi/BackOffice.BFF.WebApi.csproj"
COPY src/ ./
RUN dotnet publish "BackOffice.BFF.WebApi/BackOffice.BFF.WebApi.csproj" -c Release -o /app/publish --no-restore
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.WebApi.dll"]