From a84f12e4f8564f97010fa8c27f08850ae98d8841 Mon Sep 17 00:00:00 2001 From: alirehmani Date: Mon, 6 May 2024 12:57:07 +0500 Subject: [PATCH] update --- definition-managing-api | 4 ++++ src/Dockerfile | 40 ------------------------------------- src/Managing.Api/Dockerfile | 34 +++++++++++++++---------------- src/definition-managing-api | 4 ---- 4 files changed, 21 insertions(+), 61 deletions(-) create mode 100644 definition-managing-api delete mode 100644 src/Dockerfile delete mode 100644 src/definition-managing-api diff --git a/definition-managing-api b/definition-managing-api new file mode 100644 index 0000000..3b828e2 --- /dev/null +++ b/definition-managing-api @@ -0,0 +1,4 @@ +{ + "schemaVersion": 2, + "dockerfilePath": "./src/Managing.Api/Dockerfile" + } \ No newline at end of file diff --git a/src/Dockerfile b/src/Dockerfile deleted file mode 100644 index 1dc0eaa..0000000 --- a/src/Dockerfile +++ /dev/null @@ -1,40 +0,0 @@ -# Use the official Microsoft ASP.NET Core runtime as the base image. -FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base -WORKDIR /app -EXPOSE 80 -EXPOSE 443 - -# Use the official Microsoft .NET SDK image to build the code. -FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build -WORKDIR /src -COPY ["Managing.Api/Managing.Api.csproj", "Managing.Api/"] -COPY ["Managing.Bootstrap/Managing.Bootstrap.csproj", "Managing.Bootstrap/"] -COPY ["Managing.Infrastructure.Storage/Managing.Infrastructure.Storage.csproj", "Managing.Infrastructure.Storage/"] -COPY ["Managing.Application/Managing.Application.csproj", "Managing.Application/"] -COPY ["Managing.Infrastructure.MongoDb/Managing.Infrastructure.MongoDb.csproj", "Managing.Infrastructure.MongoDb/"] -COPY ["Managing.Common/Managing.Common.csproj", "Managing.Common/"] -COPY ["Managing.Core/Managing.Core.csproj", "Managing.Core/"] -COPY ["Managing.Application.Abstractions/Managing.Application.Abstractions.csproj", "Managing.Application.Abstractions/"] -COPY ["Managing.Domain/Managing.Domain.csproj", "Managing.Domain/"] -COPY ["Managing.Application.Workers/Managing.Application.Workers.csproj", "Managing.Application.Workers/"] -COPY ["Managing.Infrastructure.Messengers/Managing.Infrastructure.Messengers.csproj", "Managing.Infrastructure.Messengers/"] -COPY ["Managing.Infrastructure.Exchanges/Managing.Infrastructure.Exchanges.csproj", "Managing.Infrastructure.Exchanges/"] -COPY ["Managing.Infrastructure.Databases/Managing.Infrastructure.Databases.csproj", "Managing.Infrastructure.Databases/"] - -# Restore dependencies for all projects -RUN dotnet restore "Managing.Api/Managing.Api.csproj" - -# Copy everything else and build -COPY . . -WORKDIR "/src/Managing.Api" -RUN dotnet build "Managing.Api.csproj" -c Release -o /app/build - -FROM build AS publish -RUN dotnet publish "Managing.Api.csproj" -c Release -o /app/publish - -FROM base AS final -WORKDIR /app -COPY --from=publish /app/publish . -#COPY Managing.Api/managing_cert.pfx . -# Managing.Api/appsettings.Lowpro.json . -ENTRYPOINT ["dotnet", "Managing.Api.dll"] \ No newline at end of file diff --git a/src/Managing.Api/Dockerfile b/src/Managing.Api/Dockerfile index a40e648..4596759 100644 --- a/src/Managing.Api/Dockerfile +++ b/src/Managing.Api/Dockerfile @@ -7,22 +7,22 @@ EXPOSE 443 # Use the official Microsoft .NET SDK image to build the code. FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build WORKDIR /src -COPY ["/Managing.Api/Managing.Api.csproj", "Managing.Api/"] -COPY ["/Managing.Bootstrap/Managing.Bootstrap.csproj", "Managing.Bootstrap/"] -COPY ["/Managing.Infrastructure.Storage/Managing.Infrastructure.Storage.csproj", "Managing.Infrastructure.Storage/"] -COPY ["/Managing.Application/Managing.Application.csproj", "Managing.Application/"] -COPY ["/Managing.Infrastructure.MongoDb/Managing.Infrastructure.MongoDb.csproj", "Managing.Infrastructure.MongoDb/"] -COPY ["/Managing.Common/Managing.Common.csproj", "Managing.Common/"] -COPY ["/Managing.Core/Managing.Core.csproj", "Managing.Core/"] -COPY ["/Managing.Application.Abstractions/Managing.Application.Abstractions.csproj", "Managing.Application.Abstractions/"] -COPY ["/Managing.Domain/Managing.Domain.csproj", "Managing.Domain/"] -COPY ["/Managing.Application.Workers/Managing.Application.Workers.csproj", "Managing.Application.Workers/"] -COPY ["/Managing.Infrastructure.Messengers/Managing.Infrastructure.Messengers.csproj", "Managing.Infrastructure.Messengers/"] -COPY ["/Managing.Infrastructure.Exchanges/Managing.Infrastructure.Exchanges.csproj", "Managing.Infrastructure.Exchanges/"] -COPY ["/Managing.Infrastructure.Databases/Managing.Infrastructure.Databases.csproj", "Managing.Infrastructure.Databases/"] +COPY ["Managing.Api/Managing.Api.csproj", "Managing.Api/"] +COPY ["Managing.Bootstrap/Managing.Bootstrap.csproj", "Managing.Bootstrap/"] +COPY ["Managing.Infrastructure.Storage/Managing.Infrastructure.Storage.csproj", "Managing.Infrastructure.Storage/"] +COPY ["Managing.Application/Managing.Application.csproj", "Managing.Application/"] +COPY ["Managing.Infrastructure.MongoDb/Managing.Infrastructure.MongoDb.csproj", "Managing.Infrastructure.MongoDb/"] +COPY ["Managing.Common/Managing.Common.csproj", "Managing.Common/"] +COPY ["Managing.Core/Managing.Core.csproj", "Managing.Core/"] +COPY ["Managing.Application.Abstractions/Managing.Application.Abstractions.csproj", "Managing.Application.Abstractions/"] +COPY ["Managing.Domain/Managing.Domain.csproj", "Managing.Domain/"] +COPY ["Managing.Application.Workers/Managing.Application.Workers.csproj", "Managing.Application.Workers/"] +COPY ["Managing.Infrastructure.Messengers/Managing.Infrastructure.Messengers.csproj", "Managing.Infrastructure.Messengers/"] +COPY ["Managing.Infrastructure.Exchanges/Managing.Infrastructure.Exchanges.csproj", "Managing.Infrastructure.Exchanges/"] +COPY ["Managing.Infrastructure.Databases/Managing.Infrastructure.Databases.csproj", "Managing.Infrastructure.Databases/"] # Restore dependencies for all projects -RUN dotnet restore "./Managing.Api/Managing.Api.csproj" +RUN dotnet restore "Managing.Api/Managing.Api.csproj" # Copy everything else and build # COPY . . @@ -35,6 +35,6 @@ RUN dotnet restore "./Managing.Api/Managing.Api.csproj" # FROM base AS final # WORKDIR /app # COPY --from=publish /app/publish . -#COPY Managing.Api/managing_cert.pfx . -# Managing.Api/appsettings.Lowpro.json . -# ENTRYPOINT ["dotnet", "Managing.Api.dll"] \ No newline at end of file +# #COPY Managing.Api/managing_cert.pfx . +# # Managing.Api/appsettings.Lowpro.json . +# ENTRYPOINT ["dotnet", "Managing.Api.dll"] diff --git a/src/definition-managing-api b/src/definition-managing-api deleted file mode 100644 index b0ac362..0000000 --- a/src/definition-managing-api +++ /dev/null @@ -1,4 +0,0 @@ -{ - "schemaVersion": 2, - "dockerfilePath": "./Managing.Api/Dockerfile" - }