From 47d4d3cff6a332416ab2ceb6439fda16edab3aa5 Mon Sep 17 00:00:00 2001 From: Satyendra Hari Date: Mon, 24 Jul 2023 16:32:36 +0530 Subject: [PATCH] add to the container --- .../Mobile.Bff.Shopping/aggregator/Dockerfile | 1 + .../Web.Bff.Shopping/aggregator/Dockerfile | 1 + src/Directory.Packages.props | 2 +- src/Services/Basket/Basket.API/Dockerfile | 1 + src/Services/Catalog/Catalog.API/Dockerfile | 1 + src/Services/Contact/Contact.API/Dockerfile | 60 +++++++++++++++++ src/Services/Identity/Identity.API/Dockerfile | 1 + src/Services/Ordering/Ordering.API/Dockerfile | 1 + .../Ordering.BackgroundTasks/Dockerfile | 1 + .../Ordering/Ordering.SignalrHub/Dockerfile | 1 + src/Services/Payment/Payment.API/Dockerfile | 1 + src/Services/Webhooks/Webhooks.API/Dockerfile | 1 + src/Web/WebMVC/Dockerfile | 1 + src/Web/WebSPA/Dockerfile | 1 + src/Web/WebStatus/Dockerfile | 1 + src/Web/WebhookClient/Dockerfile | 1 + src/docker-compose.dcproj | 2 +- src/docker-compose.override.yml | 10 ++- src/docker-compose.yml | 65 ++++++++----------- src/eShopOnContainers-ServicesAndWebApps.sln | 54 +++++++++++++++ 20 files changed, 165 insertions(+), 42 deletions(-) create mode 100644 src/Services/Contact/Contact.API/Dockerfile diff --git a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile index 9a6b83be8..d50399083 100644 --- a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile +++ b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile @@ -33,6 +33,7 @@ COPY "Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj" "Service COPY "Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj" "Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj" COPY "Services/Payment/Payment.API/Payment.API.csproj" "Services/Payment/Payment.API/Payment.API.csproj" COPY "Services/Services.Common/Services.Common.csproj" "Services/Services.Common/Services.Common.csproj" +COPY "Services/Contact/Contact.API/Contact.API.csproj" "Services/Contact/Contact.API/Contact.API.csproj" COPY "Services/Webhooks/Webhooks.API/Webhooks.API.csproj" "Services/Webhooks/Webhooks.API/Webhooks.API.csproj" COPY "Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj" "Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj" COPY "Web/WebhookClient/WebhookClient.csproj" "Web/WebhookClient/WebhookClient.csproj" diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile b/src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile index e8bd952a2..c02e6abc9 100644 --- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile @@ -33,6 +33,7 @@ COPY "Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj" "Service COPY "Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj" "Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj" COPY "Services/Payment/Payment.API/Payment.API.csproj" "Services/Payment/Payment.API/Payment.API.csproj" COPY "Services/Services.Common/Services.Common.csproj" "Services/Services.Common/Services.Common.csproj" +COPY "Services/Contact/Contact.API/Contact.API.csproj" "Services/Contact/Contact.API/Contact.API.csproj" COPY "Services/Webhooks/Webhooks.API/Webhooks.API.csproj" "Services/Webhooks/Webhooks.API/Webhooks.API.csproj" COPY "Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj" "Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj" COPY "Web/WebhookClient/WebhookClient.csproj" "Web/WebhookClient/WebhookClient.csproj" diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 9a7ce49ec..845c21520 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -74,7 +74,7 @@ - + diff --git a/src/Services/Basket/Basket.API/Dockerfile b/src/Services/Basket/Basket.API/Dockerfile index 71bfc1547..26e34127a 100644 --- a/src/Services/Basket/Basket.API/Dockerfile +++ b/src/Services/Basket/Basket.API/Dockerfile @@ -32,6 +32,7 @@ COPY "Services/Ordering/Ordering.Infrastructure/Ordering.Infrastructure.csproj" COPY "Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj" "Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj" COPY "Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj" "Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj" COPY "Services/Payment/Payment.API/Payment.API.csproj" "Services/Payment/Payment.API/Payment.API.csproj" +COPY "Services/Contact/Contact.API/Contact.API.csproj" "Services/Contact/Contact.API/Contact.API.csproj" COPY "Services/Services.Common/Services.Common.csproj" "Services/Services.Common/Services.Common.csproj" COPY "Services/Webhooks/Webhooks.API/Webhooks.API.csproj" "Services/Webhooks/Webhooks.API/Webhooks.API.csproj" COPY "Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj" "Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj" diff --git a/src/Services/Catalog/Catalog.API/Dockerfile b/src/Services/Catalog/Catalog.API/Dockerfile index 9138482c1..1591ad5d5 100644 --- a/src/Services/Catalog/Catalog.API/Dockerfile +++ b/src/Services/Catalog/Catalog.API/Dockerfile @@ -33,6 +33,7 @@ COPY "Services/Ordering/Ordering.Infrastructure/Ordering.Infrastructure.csproj" COPY "Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj" "Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj" COPY "Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj" "Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj" COPY "Services/Payment/Payment.API/Payment.API.csproj" "Services/Payment/Payment.API/Payment.API.csproj" +COPY "Services/Contact/Contact.API/Contact.API.csproj" "Services/Contact/Contact.API/Contact.API.csproj" COPY "Services/Services.Common/Services.Common.csproj" "Services/Services.Common/Services.Common.csproj" COPY "Services/Webhooks/Webhooks.API/Webhooks.API.csproj" "Services/Webhooks/Webhooks.API/Webhooks.API.csproj" COPY "Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj" "Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj" diff --git a/src/Services/Contact/Contact.API/Dockerfile b/src/Services/Contact/Contact.API/Dockerfile new file mode 100644 index 000000000..c2509a41f --- /dev/null +++ b/src/Services/Contact/Contact.API/Dockerfile @@ -0,0 +1,60 @@ +#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging. + +FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base +WORKDIR /app +EXPOSE 80 +EXPOSE 443 + +FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build +WORKDIR /src +COPY "eShopOnContainers-ServicesAndWebApps.sln" "eShopOnContainers-ServicesAndWebApps.sln" + +COPY "ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator.csproj" "ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator.csproj" +COPY "ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj" "ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj" +COPY "BuildingBlocks/EventBus/EventBus/EventBus.csproj" "BuildingBlocks/EventBus/EventBus/EventBus.csproj" +COPY "BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj" "BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj" +COPY "BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj" "BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj" +COPY "BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj" "BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj" +COPY "BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj" "BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj" +COPY "BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj" "BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj" +COPY "Services/Basket/Basket.API/Basket.API.csproj" "Services/Basket/Basket.API/Basket.API.csproj" +COPY "Services/Basket/Basket.FunctionalTests/Basket.FunctionalTests.csproj" "Services/Basket/Basket.FunctionalTests/Basket.FunctionalTests.csproj" +COPY "Services/Basket/Basket.UnitTests/Basket.UnitTests.csproj" "Services/Basket/Basket.UnitTests/Basket.UnitTests.csproj" +COPY "Services/Catalog/Catalog.API/Catalog.API.csproj" "Services/Catalog/Catalog.API/Catalog.API.csproj" +COPY "Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj" "Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj" +COPY "Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj" "Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj" +COPY "Services/Identity/Identity.API/Identity.API.csproj" "Services/Identity/Identity.API/Identity.API.csproj" +COPY "Services/Ordering/Ordering.API/Ordering.API.csproj" "Services/Ordering/Ordering.API/Ordering.API.csproj" +COPY "Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj" "Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj" +COPY "Services/Ordering/Ordering.Domain/Ordering.Domain.csproj" "Services/Ordering/Ordering.Domain/Ordering.Domain.csproj" +COPY "Services/Ordering/Ordering.FunctionalTests/Ordering.FunctionalTests.csproj" "Services/Ordering/Ordering.FunctionalTests/Ordering.FunctionalTests.csproj" +COPY "Services/Ordering/Ordering.Infrastructure/Ordering.Infrastructure.csproj" "Services/Ordering/Ordering.Infrastructure/Ordering.Infrastructure.csproj" +COPY "Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj" "Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj" +COPY "Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj" "Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj" +COPY "Services/Payment/Payment.API/Payment.API.csproj" "Services/Payment/Payment.API/Payment.API.csproj" +COPY "Services/Contact/Contact.API/Contact.API.csproj" "Services/Contact/Contact.API/Contact.API.csproj" +COPY "Services/Services.Common/Services.Common.csproj" "Services/Services.Common/Services.Common.csproj" +COPY "Services/Webhooks/Webhooks.API/Webhooks.API.csproj" "Services/Webhooks/Webhooks.API/Webhooks.API.csproj" +COPY "Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj" "Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj" +COPY "Web/WebhookClient/WebhookClient.csproj" "Web/WebhookClient/WebhookClient.csproj" +COPY "Web/WebMVC/WebMVC.csproj" "Web/WebMVC/WebMVC.csproj" +COPY "Web/WebSPA/WebSPA.csproj" "Web/WebSPA/WebSPA.csproj" +COPY "Web/WebStatus/WebStatus.csproj" "Web/WebStatus/WebStatus.csproj" + +COPY "docker-compose.dcproj" "docker-compose.dcproj" + +COPY "Directory.Packages.props" "Directory.Packages.props" +COPY "NuGet.config" "NuGet.config" + +RUN dotnet restore "eShopOnContainers-ServicesAndWebApps.sln" + +COPY . . +WORKDIR "/src/Services/Contact/Contact.API" +RUN dotnet publish --no-restore -c Release -o /app + +FROM build AS publish + +FROM base AS final +WORKDIR /app +COPY --from=publish /app . +ENTRYPOINT ["dotnet", "Contact.API.dll"] \ No newline at end of file diff --git a/src/Services/Identity/Identity.API/Dockerfile b/src/Services/Identity/Identity.API/Dockerfile index 574eb277a..d367d9506 100644 --- a/src/Services/Identity/Identity.API/Dockerfile +++ b/src/Services/Identity/Identity.API/Dockerfile @@ -32,6 +32,7 @@ COPY "Services/Ordering/Ordering.Infrastructure/Ordering.Infrastructure.csproj" COPY "Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj" "Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj" COPY "Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj" "Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj" COPY "Services/Payment/Payment.API/Payment.API.csproj" "Services/Payment/Payment.API/Payment.API.csproj" +COPY "Services/Contact/Contact.API/Contact.API.csproj" "Services/Contact/Contact.API/Contact.API.csproj" COPY "Services/Services.Common/Services.Common.csproj" "Services/Services.Common/Services.Common.csproj" COPY "Services/Webhooks/Webhooks.API/Webhooks.API.csproj" "Services/Webhooks/Webhooks.API/Webhooks.API.csproj" COPY "Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj" "Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj" diff --git a/src/Services/Ordering/Ordering.API/Dockerfile b/src/Services/Ordering/Ordering.API/Dockerfile index bb3268238..a6ed99ba4 100644 --- a/src/Services/Ordering/Ordering.API/Dockerfile +++ b/src/Services/Ordering/Ordering.API/Dockerfile @@ -32,6 +32,7 @@ COPY "Services/Ordering/Ordering.Infrastructure/Ordering.Infrastructure.csproj" COPY "Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj" "Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj" COPY "Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj" "Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj" COPY "Services/Payment/Payment.API/Payment.API.csproj" "Services/Payment/Payment.API/Payment.API.csproj" +COPY "Services/Contact/Contact.API/Contact.API.csproj" "Services/Contact/Contact.API/Contact.API.csproj" COPY "Services/Services.Common/Services.Common.csproj" "Services/Services.Common/Services.Common.csproj" COPY "Services/Webhooks/Webhooks.API/Webhooks.API.csproj" "Services/Webhooks/Webhooks.API/Webhooks.API.csproj" COPY "Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj" "Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj" diff --git a/src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile b/src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile index 3bebc9661..c118b9e62 100644 --- a/src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile +++ b/src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile @@ -32,6 +32,7 @@ COPY "Services/Ordering/Ordering.Infrastructure/Ordering.Infrastructure.csproj" COPY "Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj" "Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj" COPY "Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj" "Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj" COPY "Services/Payment/Payment.API/Payment.API.csproj" "Services/Payment/Payment.API/Payment.API.csproj" +COPY "Services/Contact/Contact.API/Contact.API.csproj" "Services/Contact/Contact.API/Contact.API.csproj" COPY "Services/Services.Common/Services.Common.csproj" "Services/Services.Common/Services.Common.csproj" COPY "Services/Webhooks/Webhooks.API/Webhooks.API.csproj" "Services/Webhooks/Webhooks.API/Webhooks.API.csproj" COPY "Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj" "Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj" diff --git a/src/Services/Ordering/Ordering.SignalrHub/Dockerfile b/src/Services/Ordering/Ordering.SignalrHub/Dockerfile index 12529612d..b1fe406de 100644 --- a/src/Services/Ordering/Ordering.SignalrHub/Dockerfile +++ b/src/Services/Ordering/Ordering.SignalrHub/Dockerfile @@ -33,6 +33,7 @@ COPY "Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj" "Service COPY "Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj" "Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj" COPY "Services/Payment/Payment.API/Payment.API.csproj" "Services/Payment/Payment.API/Payment.API.csproj" COPY "Services/Services.Common/Services.Common.csproj" "Services/Services.Common/Services.Common.csproj" +COPY "Services/Contact/Contact.API/Contact.API.csproj" "Services/Contact/Contact.API/Contact.API.csproj" COPY "Services/Webhooks/Webhooks.API/Webhooks.API.csproj" "Services/Webhooks/Webhooks.API/Webhooks.API.csproj" COPY "Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj" "Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj" COPY "Web/WebhookClient/WebhookClient.csproj" "Web/WebhookClient/WebhookClient.csproj" diff --git a/src/Services/Payment/Payment.API/Dockerfile b/src/Services/Payment/Payment.API/Dockerfile index d1bcc6bda..1157b923d 100644 --- a/src/Services/Payment/Payment.API/Dockerfile +++ b/src/Services/Payment/Payment.API/Dockerfile @@ -32,6 +32,7 @@ COPY "Services/Ordering/Ordering.Infrastructure/Ordering.Infrastructure.csproj" COPY "Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj" "Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj" COPY "Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj" "Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj" COPY "Services/Payment/Payment.API/Payment.API.csproj" "Services/Payment/Payment.API/Payment.API.csproj" +COPY "Services/Contact/Contact.API/Contact.API.csproj" "Services/Contact/Contact.API/Contact.API.csproj" COPY "Services/Services.Common/Services.Common.csproj" "Services/Services.Common/Services.Common.csproj" COPY "Services/Webhooks/Webhooks.API/Webhooks.API.csproj" "Services/Webhooks/Webhooks.API/Webhooks.API.csproj" COPY "Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj" "Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj" diff --git a/src/Services/Webhooks/Webhooks.API/Dockerfile b/src/Services/Webhooks/Webhooks.API/Dockerfile index 63d8fdb6b..203a96686 100644 --- a/src/Services/Webhooks/Webhooks.API/Dockerfile +++ b/src/Services/Webhooks/Webhooks.API/Dockerfile @@ -32,6 +32,7 @@ COPY "Services/Ordering/Ordering.Infrastructure/Ordering.Infrastructure.csproj" COPY "Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj" "Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj" COPY "Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj" "Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj" COPY "Services/Payment/Payment.API/Payment.API.csproj" "Services/Payment/Payment.API/Payment.API.csproj" +COPY ["Services/Contact/Contact.API/Contact.API.csproj", "Services/Contact/Contact.API/Contact.API.csproj"] COPY "Services/Services.Common/Services.Common.csproj" "Services/Services.Common/Services.Common.csproj" COPY "Services/Webhooks/Webhooks.API/Webhooks.API.csproj" "Services/Webhooks/Webhooks.API/Webhooks.API.csproj" COPY "Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj" "Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj" diff --git a/src/Web/WebMVC/Dockerfile b/src/Web/WebMVC/Dockerfile index ee0adb5b2..3a0581187 100644 --- a/src/Web/WebMVC/Dockerfile +++ b/src/Web/WebMVC/Dockerfile @@ -33,6 +33,7 @@ COPY "Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj" "Service COPY "Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj" "Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj" COPY "Services/Payment/Payment.API/Payment.API.csproj" "Services/Payment/Payment.API/Payment.API.csproj" COPY "Services/Services.Common/Services.Common.csproj" "Services/Services.Common/Services.Common.csproj" +COPY "Services/Contact/Contact.API/Contact.API.csproj" "Services/Contact/Contact.API/Contact.API.csproj" COPY "Services/Webhooks/Webhooks.API/Webhooks.API.csproj" "Services/Webhooks/Webhooks.API/Webhooks.API.csproj" COPY "Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj" "Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj" COPY "Web/WebhookClient/WebhookClient.csproj" "Web/WebhookClient/WebhookClient.csproj" diff --git a/src/Web/WebSPA/Dockerfile b/src/Web/WebSPA/Dockerfile index 383a46f2c..3c2f5ab9d 100644 --- a/src/Web/WebSPA/Dockerfile +++ b/src/Web/WebSPA/Dockerfile @@ -44,6 +44,7 @@ COPY "Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj" "Service COPY "Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj" "Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj" COPY "Services/Payment/Payment.API/Payment.API.csproj" "Services/Payment/Payment.API/Payment.API.csproj" COPY "Services/Services.Common/Services.Common.csproj" "Services/Services.Common/Services.Common.csproj" +COPY "Services/Contact/Contact.API/Contact.API.csproj" "Services/Contact/Contact.API/Contact.API.csproj" COPY "Services/Webhooks/Webhooks.API/Webhooks.API.csproj" "Services/Webhooks/Webhooks.API/Webhooks.API.csproj" COPY "Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj" "Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj" COPY "Web/WebhookClient/WebhookClient.csproj" "Web/WebhookClient/WebhookClient.csproj" diff --git a/src/Web/WebStatus/Dockerfile b/src/Web/WebStatus/Dockerfile index c9ec1f58d..432735263 100644 --- a/src/Web/WebStatus/Dockerfile +++ b/src/Web/WebStatus/Dockerfile @@ -32,6 +32,7 @@ COPY "Services/Ordering/Ordering.Infrastructure/Ordering.Infrastructure.csproj" COPY "Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj" "Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj" COPY "Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj" "Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj" COPY "Services/Payment/Payment.API/Payment.API.csproj" "Services/Payment/Payment.API/Payment.API.csproj" +COPY "Services/Contact/Contact.API/Contact.API.csproj" "Services/Contact/Contact.API/Contact.API.csproj" COPY "Services/Services.Common/Services.Common.csproj" "Services/Services.Common/Services.Common.csproj" COPY "Services/Webhooks/Webhooks.API/Webhooks.API.csproj" "Services/Webhooks/Webhooks.API/Webhooks.API.csproj" COPY "Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj" "Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj" diff --git a/src/Web/WebhookClient/Dockerfile b/src/Web/WebhookClient/Dockerfile index 722c59977..4d8533a9d 100644 --- a/src/Web/WebhookClient/Dockerfile +++ b/src/Web/WebhookClient/Dockerfile @@ -33,6 +33,7 @@ COPY "Services/Ordering/Ordering.Infrastructure/Ordering.Infrastructure.csproj" COPY "Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj" "Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj" COPY "Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj" "Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj" COPY "Services/Payment/Payment.API/Payment.API.csproj" "Services/Payment/Payment.API/Payment.API.csproj" +COPY "Services/Contact/Contact.API/Contact.API.csproj" "Services/Contact/Contact.API/Contact.API.csproj" COPY "Services/Services.Common/Services.Common.csproj" "Services/Services.Common/Services.Common.csproj" COPY "Services/Webhooks/Webhooks.API/Webhooks.API.csproj" "Services/Webhooks/Webhooks.API/Webhooks.API.csproj" COPY "Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj" "Tests/Services/Application.FunctionalTests/Application.FunctionalTests.csproj" diff --git a/src/docker-compose.dcproj b/src/docker-compose.dcproj index ccd8633e0..296c4b5e0 100644 --- a/src/docker-compose.dcproj +++ b/src/docker-compose.dcproj @@ -3,7 +3,7 @@ fea0c318-ffed-4d39-8781-265718ca43dd True - http://host.docker.internal:5100 + http://localhost:5100 webmvc Linux 2.1 diff --git a/src/docker-compose.override.yml b/src/docker-compose.override.yml index 086804125..8ebdf6470 100644 --- a/src/docker-compose.override.yml +++ b/src/docker-compose.override.yml @@ -155,7 +155,15 @@ services: - OrchestratorType=${ORCHESTRATOR_TYPE} ports: - "5108:80" - + + contect-api: + environment: + - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_URLS=http://0.0.0.0:80 + - ConnectionStrings__CatalogDb=${ESHOP_AZURE_CATALOG_DB:-Server=sqldata;Database=Microsoft.eShopOnContainers.Services.ContactDb;User Id=sa;Password=Pass@word;Encrypt=False;TrustServerCertificate=true} + ports: + - "5110:80" + webhooks-api: environment: - ASPNETCORE_ENVIRONMENT=Development diff --git a/src/docker-compose.yml b/src/docker-compose.yml index 2d919945c..1352cea42 100644 --- a/src/docker-compose.yml +++ b/src/docker-compose.yml @@ -1,32 +1,31 @@ version: '3.4' - services: - seq: - image: datalust/seq:latest - + image: 'datalust/seq:latest' sqldata: - image: mcr.microsoft.com/mssql/server:2019-latest - + image: 'mcr.microsoft.com/mssql/server:2019-latest' nosqldata: image: mongo - basketdata: - image: redis:alpine - + image: 'redis:alpine' rabbitmq: - image: rabbitmq:3-management-alpine - + image: 'rabbitmq:3-management-alpine' identity-api: - image: ${REGISTRY:-eshop}/identity.api:${PLATFORM:-linux}-${TAG:-latest} + image: '${REGISTRY:-eshop}/identity.api:${PLATFORM:-linux}-${TAG:-latest}' build: context: . dockerfile: Services/Identity/Identity.API/Dockerfile depends_on: - sqldata - + contect-api: + image: '${REGISTRY:-eshop}/contect.api:${PLATFORM:-linux}-${TAG:-latest}' + build: + context: . + dockerfile: Services/Contact/Contact.API/Dockerfile + depends_on: + - sqldata basket-api: - image: ${REGISTRY:-eshop}/basket.api:${PLATFORM:-linux}-${TAG:-latest} + image: '${REGISTRY:-eshop}/basket.api:${PLATFORM:-linux}-${TAG:-latest}' build: context: . dockerfile: Services/Basket/Basket.API/Dockerfile @@ -34,52 +33,46 @@ services: - basketdata - identity-api - rabbitmq - catalog-api: - image: ${REGISTRY:-eshop}/catalog.api:${PLATFORM:-linux}-${TAG:-latest} + image: '${REGISTRY:-eshop}/catalog.api:${PLATFORM:-linux}-${TAG:-latest}' build: context: . dockerfile: Services/Catalog/Catalog.API/Dockerfile depends_on: - sqldata - rabbitmq - ordering-api: - image: ${REGISTRY:-eshop}/ordering.api:${PLATFORM:-linux}-${TAG:-latest} + image: '${REGISTRY:-eshop}/ordering.api:${PLATFORM:-linux}-${TAG:-latest}' build: context: . dockerfile: Services/Ordering/Ordering.API/Dockerfile depends_on: - sqldata - rabbitmq - ordering-backgroundtasks: - image: ${REGISTRY:-eshop}/ordering.backgroundtasks:${PLATFORM:-linux}-${TAG:-latest} + image: '${REGISTRY:-eshop}/ordering.backgroundtasks:${PLATFORM:-linux}-${TAG:-latest}' build: context: . dockerfile: Services/Ordering/Ordering.BackgroundTasks/Dockerfile depends_on: - sqldata - rabbitmq - payment-api: - image: ${REGISTRY:-eshop}/payment.api:${PLATFORM:-linux}-${TAG:-latest} + image: '${REGISTRY:-eshop}/payment.api:${PLATFORM:-linux}-${TAG:-latest}' build: context: . dockerfile: Services/Payment/Payment.API/Dockerfile depends_on: - rabbitmq - webhooks-api: - image: ${REGISTRY:-eshop}/webhooks.api:${PLATFORM:-linux}-${TAG:-latest} + image: '${REGISTRY:-eshop}/webhooks.api:${PLATFORM:-linux}-${TAG:-latest}' build: context: . dockerfile: Services/Webhooks/Webhooks.API/Dockerfile depends_on: - sqldata - mobileshoppingagg: - image: ${REGISTRY:-eshop}/mobileshoppingagg:${PLATFORM:-linux}-${TAG:-latest} + image: '${REGISTRY:-eshop}/mobileshoppingagg:${PLATFORM:-linux}-${TAG:-latest}' build: context: . dockerfile: ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile @@ -91,9 +84,8 @@ services: - ordering-api - catalog-api - basket-api - webshoppingagg: - image: ${REGISTRY:-eshop}/webshoppingagg:${PLATFORM:-linux}-${TAG:-latest} + image: '${REGISTRY:-eshop}/webshoppingagg:${PLATFORM:-linux}-${TAG:-latest}' build: context: . dockerfile: ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile @@ -105,9 +97,8 @@ services: - ordering-api - catalog-api - basket-api - ordering-signalrhub: - image: ${REGISTRY:-eshop}/ordering.signalrhub:${PLATFORM:-linux}-${TAG:-latest} + image: '${REGISTRY:-eshop}/ordering.signalrhub:${PLATFORM:-linux}-${TAG:-latest}' build: context: . dockerfile: Services/Ordering/Ordering.SignalrHub/Dockerfile @@ -119,33 +110,29 @@ services: - ordering-api - catalog-api - basket-api - webstatus: - image: ${REGISTRY:-eshop}/webstatus:${PLATFORM:-linux}-${TAG:-latest} + image: '${REGISTRY:-eshop}/webstatus:${PLATFORM:-linux}-${TAG:-latest}' build: context: . dockerfile: Web/WebStatus/Dockerfile - webspa: - image: ${REGISTRY:-eshop}/webspa:${PLATFORM:-linux}-${TAG:-latest} + image: '${REGISTRY:-eshop}/webspa:${PLATFORM:-linux}-${TAG:-latest}' build: context: . dockerfile: Web/WebSPA/Dockerfile args: - NODE_IMAGE: ${NODE_IMAGE:-node:16-bullseye} + NODE_IMAGE: '${NODE_IMAGE:-node:16-bullseye}' depends_on: - webshoppingagg - webmvc: - image: ${REGISTRY:-eshop}/webmvc:${PLATFORM:-linux}-${TAG:-latest} + image: '${REGISTRY:-eshop}/webmvc:${PLATFORM:-linux}-${TAG:-latest}' build: context: . dockerfile: Web/WebMVC/Dockerfile depends_on: - webshoppingagg - webhooks-client: - image: ${REGISTRY:-eshop}/webhooks.client:${PLATFORM:-linux}-${TAG:-latest} + image: '${REGISTRY:-eshop}/webhooks.client:${PLATFORM:-linux}-${TAG:-latest}' build: context: . dockerfile: Web/WebhookClient/Dockerfile diff --git a/src/eShopOnContainers-ServicesAndWebApps.sln b/src/eShopOnContainers-ServicesAndWebApps.sln index d73ec39c4..78e87330c 100644 --- a/src/eShopOnContainers-ServicesAndWebApps.sln +++ b/src/eShopOnContainers-ServicesAndWebApps.sln @@ -117,6 +117,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Services.Common", "Services EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Common", "Common", "{42B85D0F-2ED6-4C00-91FA-103DACC3D5E2}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Contact", "Contact", "{C7684980-DC20-4957-85E4-92363C252256}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Contact.API", "Services\Contact\Contact.API\Contact.API.csproj", "{D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Ad-Hoc|Any CPU = Ad-Hoc|Any CPU @@ -1523,6 +1527,54 @@ Global {CD430CE4-D5E0-4C96-84F5-AEC9162651B5}.Release|x64.Build.0 = Release|Any CPU {CD430CE4-D5E0-4C96-84F5-AEC9162651B5}.Release|x86.ActiveCfg = Release|Any CPU {CD430CE4-D5E0-4C96-84F5-AEC9162651B5}.Release|x86.Build.0 = Release|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.Ad-Hoc|x64.Build.0 = Debug|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.Ad-Hoc|x86.Build.0 = Debug|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.AppStore|Any CPU.Build.0 = Debug|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.AppStore|ARM.ActiveCfg = Debug|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.AppStore|ARM.Build.0 = Debug|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.AppStore|iPhone.ActiveCfg = Debug|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.AppStore|iPhone.Build.0 = Debug|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.AppStore|x64.ActiveCfg = Debug|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.AppStore|x64.Build.0 = Debug|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.AppStore|x86.ActiveCfg = Debug|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.AppStore|x86.Build.0 = Debug|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.Debug|ARM.ActiveCfg = Debug|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.Debug|ARM.Build.0 = Debug|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.Debug|iPhone.Build.0 = Debug|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.Debug|x64.ActiveCfg = Debug|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.Debug|x64.Build.0 = Debug|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.Debug|x86.ActiveCfg = Debug|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.Debug|x86.Build.0 = Debug|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.Release|Any CPU.Build.0 = Release|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.Release|ARM.ActiveCfg = Release|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.Release|ARM.Build.0 = Release|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.Release|iPhone.ActiveCfg = Release|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.Release|iPhone.Build.0 = Release|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.Release|x64.ActiveCfg = Release|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.Release|x64.Build.0 = Release|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.Release|x86.ActiveCfg = Release|Any CPU + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1578,6 +1630,8 @@ Global {95D735BE-2899-4495-BE3F-2600E93B4E3C} = {373D8AA1-36BE-49EC-89F0-6CB736666285} {CD430CE4-D5E0-4C96-84F5-AEC9162651B5} = {42B85D0F-2ED6-4C00-91FA-103DACC3D5E2} {42B85D0F-2ED6-4C00-91FA-103DACC3D5E2} = {91CF7717-08AB-4E65-B10E-0B426F01E2E8} + {C7684980-DC20-4957-85E4-92363C252256} = {91CF7717-08AB-4E65-B10E-0B426F01E2E8} + {D02363DB-3F96-4DA7-BB18-B2DEE08BF3C3} = {C7684980-DC20-4957-85E4-92363C252256} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {25728519-5F0F-4973-8A64-0A81EB4EA8D9}