diff --git a/src/ApiGateways/ApiGw-Base/Dockerfile.develop b/src/ApiGateways/ApiGw-Base/Dockerfile.develop new file mode 100644 index 000000000..4da230d68 --- /dev/null +++ b/src/ApiGateways/ApiGw-Base/Dockerfile.develop @@ -0,0 +1,14 @@ +FROM microsoft/dotnet:2.2-sdk +ARG BUILD_CONFIGURATION=Debug +ENV ASPNETCORE_ENVIRONMENT=Development +ENV DOTNET_USE_POLLING_FILE_WATCHER=true +EXPOSE 80 + +WORKDIR /src +COPY ["src/ApiGateways/ApiGw-Base/OcelotApiGw.csproj", "src/ApiGateways/ApiGw-Base/"] +RUN dotnet restore "src/ApiGateways/ApiGw-Base/OcelotApiGw.csproj" +COPY . . +WORKDIR "/src/src/ApiGateways/ApiGw-Base" +RUN dotnet build --no-restore "OcelotApiGw.csproj" -c $BUILD_CONFIGURATION + +ENTRYPOINT ["dotnet", "run", "--no-build", "--no-launch-profile", "-c", "$BUILD_CONFIGURATION", "--"] \ No newline at end of file diff --git a/src/ApiGateways/Mobile.Bff.Marketing/apigw/azds.yaml b/src/ApiGateways/Mobile.Bff.Marketing/apigw/azds.yaml new file mode 100644 index 000000000..85c7a9f64 --- /dev/null +++ b/src/ApiGateways/Mobile.Bff.Marketing/apigw/azds.yaml @@ -0,0 +1,41 @@ +kind: helm-release +apiVersion: 1.1 +build: + context: ..\..\..\..\ + dockerfile: ..\..\..\..\ApiGateways\ApiGw-Base\Dockerfile +install: + chart: ../../../../k8s/helm/apigwwm + set: + replicaCount: 1 + image: + tag: $(tag) + pullPolicy: Never + ingress: + annotations: + kubernetes.io/ingress.class: traefik-azds + hosts: + # This expands to [space.s.]webmvc...aksapp.io + - $(spacePrefix)apigwwm$(hostSuffix) + values: + - values.dev.yaml? + - secrets.dev.yaml? + - inf.yaml + - app.yaml +configurations: + develop: + build: + useGitIgnore: true + dockerfile: ..\..\..\ApiGateways\ApiGw-Base\Dockerfile.develop + args: + BUILD_CONFIGURATION: ${BUILD_CONFIGURATION:-Debug} + container: + sync: + - '**/Pages/**' + - '**/Views/**' + - '**/wwwroot/**' + - '!**/*.{sln,csproj}' + command: [dotnet, run, --no-restore, --no-build, --no-launch-profile, -c, "${BUILD_CONFIGURATION:-Debug}"] + iterate: + processesToKill: [dotnet, vsdbg] + buildCommands: + - [dotnet, build, --no-restore, -c, "${BUILD_CONFIGURATION:-Debug}"] diff --git a/src/ApiGateways/Mobile.Bff.Marketing/apigw/values.dev.yaml b/src/ApiGateways/Mobile.Bff.Marketing/apigw/values.dev.yaml new file mode 100644 index 000000000..fb59d98d5 --- /dev/null +++ b/src/ApiGateways/Mobile.Bff.Marketing/apigw/values.dev.yaml @@ -0,0 +1,2 @@ +ocelot: + configPath: /src/src/ApiGateways/ApiGw-Base/configuration \ No newline at end of file diff --git a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile.develop b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile.develop index 64e63de0f..16d42e393 100644 --- a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile.develop +++ b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile.develop @@ -1,7 +1,7 @@ -FROM microsoft/dotnet:2.2.100-sdk +FROM microsoft/dotnet:2.2-sdk +ARG BUILD_CONFIGURATION=Debug ENV ASPNETCORE_ENVIRONMENT=Development ENV DOTNET_USE_POLLING_FILE_WATCHER=true - EXPOSE 80 WORKDIR /src @@ -12,4 +12,4 @@ COPY . . WORKDIR "/src/src/ApiGateways/Mobile.Bff.Shopping/aggregator" RUN dotnet build --no-restore -c $BUILD_CONFIGURATION -CMD ["dotnet", "run", "--no-restore", "--no-build", "--no-launch-profile"] \ No newline at end of file +CMD ["dotnet", "run", "--no-build", "--no-launch-profile", "-c", "$BUILD_CONFIGURATION", "--"]] \ No newline at end of file diff --git a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/azds.yaml b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/azds.yaml index 6537b476e..b4ffe0e20 100644 --- a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/azds.yaml +++ b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/azds.yaml @@ -1,41 +1,52 @@ kind: helm-release -apiVersion: 1.0 +apiVersion: 1.1 build: context: ..\..\..\.. dockerfile: Dockerfile install: - chart: ../../../../k8s/helm/apigwms - values: - - values.dev.yaml? - - secrets.dev.yaml? - - ..\..\..\..\k8s\helm\app.yaml - - ..\..\..\..\k8s\helm\inf.yaml + chart: ../../../../k8s/helm/mobileshoppingagg set: image: tag: $(tag) pullPolicy: Never - inf: - k8s: - dns: "$(spacePrefix)apigwms$(hostSuffix)" - disableProbes: true ingress: + annotations: + kubernetes.io/ingress.class: traefik-azds hosts: # This expands to [space.s.]apigwms...aksapp.io - - $(spacePrefix)apigwms$(hostSuffix) + - $(spacePrefix)mobileshoppingagg$(hostSuffix) + values: + - values.dev.yaml? + - secrets.dev.yaml? + - app.yaml + - inf.yaml configurations: develop: build: - dockerfile: Dockerfile.develop useGitIgnore: true + dockerfile: Dockerfile.develop container: syncTarget: /src sync: - - "**/Pages/**" - - "**/Views/**" - - "**/wwwroot/**" - - "!**/*.{sln,csproj}" - command: [dotnet, run, --no-restore, --no-build, --no-launch-profile, -c, "${Configuration:-Debug}"] + - '**/Pages/**' + - '**/Views/**' + - '**/wwwroot/**' + - '!**/*.{sln,csproj}' + command: + - dotnet + - run + - --no-restore + - --no-build + - --no-launch-profile + - -c + - ${Configuration:-Debug} iterate: - processesToKill: [dotnet, vsdbg] + processesToKill: + - dotnet + - vsdbg buildCommands: - - [dotnet, build, --no-restore, -c, "${Configuration:-Debug}"] + - - dotnet + - build + - --no-restore + - -c + - ${Configuration:-Debug} diff --git a/src/ApiGateways/Mobile.Bff.Shopping/apigw/azds.yaml b/src/ApiGateways/Mobile.Bff.Shopping/apigw/azds.yaml new file mode 100644 index 000000000..6e64cf5cf --- /dev/null +++ b/src/ApiGateways/Mobile.Bff.Shopping/apigw/azds.yaml @@ -0,0 +1,41 @@ +kind: helm-release +apiVersion: 1.1 +build: + context: ..\..\..\..\ + dockerfile: ..\..\..\..\ApiGateways\ApiGw-Base\Dockerfile +install: + chart: ../../../../k8s/helm/apigwms + set: + replicaCount: 1 + image: + tag: $(tag) + pullPolicy: Never + ingress: + annotations: + kubernetes.io/ingress.class: traefik-azds + hosts: + # This expands to [space.s.]webmvc...aksapp.io + - $(spacePrefix)apigwms$(hostSuffix) + values: + - values.dev.yaml? + - secrets.dev.yaml? + - inf.yaml + - app.yaml +configurations: + develop: + build: + useGitIgnore: true + dockerfile: ..\..\..\ApiGateways\ApiGw-Base\Dockerfile.develop + args: + BUILD_CONFIGURATION: ${BUILD_CONFIGURATION:-Debug} + container: + sync: + - '**/Pages/**' + - '**/Views/**' + - '**/wwwroot/**' + - '!**/*.{sln,csproj}' + command: [dotnet, run, --no-restore, --no-build, --no-launch-profile, -c, "${BUILD_CONFIGURATION:-Debug}"] + iterate: + processesToKill: [dotnet, vsdbg] + buildCommands: + - [dotnet, build, --no-restore, -c, "${BUILD_CONFIGURATION:-Debug}"] diff --git a/src/ApiGateways/Mobile.Bff.Shopping/apigw/values.dev.yaml b/src/ApiGateways/Mobile.Bff.Shopping/apigw/values.dev.yaml new file mode 100644 index 000000000..fb59d98d5 --- /dev/null +++ b/src/ApiGateways/Mobile.Bff.Shopping/apigw/values.dev.yaml @@ -0,0 +1,2 @@ +ocelot: + configPath: /src/src/ApiGateways/ApiGw-Base/configuration \ No newline at end of file diff --git a/src/ApiGateways/Web.Bff.Marketing/apigw/azds.yaml b/src/ApiGateways/Web.Bff.Marketing/apigw/azds.yaml new file mode 100644 index 000000000..4d36cad78 --- /dev/null +++ b/src/ApiGateways/Web.Bff.Marketing/apigw/azds.yaml @@ -0,0 +1,41 @@ +kind: helm-release +apiVersion: 1.1 +build: + context: ..\..\..\..\ + dockerfile: ..\..\..\..\ApiGateways\ApiGw-Base\Dockerfile +install: + chart: ../../../../k8s/helm/apigwmm + set: + replicaCount: 1 + image: + tag: $(tag) + pullPolicy: Never + ingress: + annotations: + kubernetes.io/ingress.class: traefik-azds + hosts: + # This expands to [space.s.]webmvc...aksapp.io + - $(spacePrefix)apigwmm$(hostSuffix) + values: + - values.dev.yaml? + - secrets.dev.yaml? + - inf.yaml + - app.yaml +configurations: + develop: + build: + useGitIgnore: true + dockerfile: ..\..\..\ApiGateways\ApiGw-Base\Dockerfile.develop + args: + BUILD_CONFIGURATION: ${BUILD_CONFIGURATION:-Debug} + container: + sync: + - '**/Pages/**' + - '**/Views/**' + - '**/wwwroot/**' + - '!**/*.{sln,csproj}' + command: [dotnet, run, --no-restore, --no-build, --no-launch-profile, -c, "${BUILD_CONFIGURATION:-Debug}"] + iterate: + processesToKill: [dotnet, vsdbg] + buildCommands: + - [dotnet, build, --no-restore, -c, "${BUILD_CONFIGURATION:-Debug}"] diff --git a/src/ApiGateways/Web.Bff.Marketing/apigw/values.dev.yaml b/src/ApiGateways/Web.Bff.Marketing/apigw/values.dev.yaml new file mode 100644 index 000000000..fb59d98d5 --- /dev/null +++ b/src/ApiGateways/Web.Bff.Marketing/apigw/values.dev.yaml @@ -0,0 +1,2 @@ +ocelot: + configPath: /src/src/ApiGateways/ApiGw-Base/configuration \ No newline at end of file diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile.develop b/src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile.develop new file mode 100644 index 000000000..c5c80af40 --- /dev/null +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile.develop @@ -0,0 +1,15 @@ +FROM microsoft/dotnet:2.2-sdk +ARG BUILD_CONFIGURATION=Debug +ENV ASPNETCORE_ENVIRONMENT=Development +ENV DOTNET_USE_POLLING_FILE_WATCHER=true +EXPOSE 80 + +WORKDIR /src +COPY ["src/ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj", "src/ApiGateways/Web.Bff.Shopping/aggregator/"] + +RUN dotnet restore src/ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj -nowarn:msb3202,nu1503 +COPY . . +WORKDIR "/src/src/ApiGateways/Web.Bff.Shopping/aggregator" +RUN dotnet build --no-restore -c $BUILD_CONFIGURATION + +CMD ["dotnet", "run", "--no-build", "--no-launch-profile", "-c", "$BUILD_CONFIGURATION", "--"]] \ No newline at end of file diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/azds.yaml b/src/ApiGateways/Web.Bff.Shopping/aggregator/azds.yaml new file mode 100644 index 000000000..63bb14c94 --- /dev/null +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/azds.yaml @@ -0,0 +1,52 @@ +kind: helm-release +apiVersion: 1.1 +build: + context: ..\..\..\.. + dockerfile: Dockerfile +install: + chart: ../../../../k8s/helm/webshoppingagg + set: + image: + tag: $(tag) + pullPolicy: Never + ingress: + annotations: + kubernetes.io/ingress.class: traefik-azds + hosts: + # This expands to [space.s.]apigwms...aksapp.io + - $(spacePrefix)webshoppingagg$(hostSuffix) + values: + - values.dev.yaml? + - secrets.dev.yaml? + - app.yaml + - inf.yaml +configurations: + develop: + build: + useGitIgnore: true + dockerfile: Dockerfile.develop + container: + syncTarget: /src + sync: + - '**/Pages/**' + - '**/Views/**' + - '**/wwwroot/**' + - '!**/*.{sln,csproj}' + command: + - dotnet + - run + - --no-restore + - --no-build + - --no-launch-profile + - -c + - ${Configuration:-Debug} + iterate: + processesToKill: + - dotnet + - vsdbg + buildCommands: + - - dotnet + - build + - --no-restore + - -c + - ${Configuration:-Debug} diff --git a/src/ApiGateways/Web.Bff.Shopping/apigw/azds.yaml b/src/ApiGateways/Web.Bff.Shopping/apigw/azds.yaml new file mode 100644 index 000000000..3aff7a62b --- /dev/null +++ b/src/ApiGateways/Web.Bff.Shopping/apigw/azds.yaml @@ -0,0 +1,41 @@ +kind: helm-release +apiVersion: 1.1 +build: + context: ..\..\..\..\ + dockerfile: ..\..\..\..\ApiGateways\ApiGw-Base\Dockerfile +install: + chart: ../../../../k8s/helm/apigwws + set: + replicaCount: 1 + image: + tag: $(tag) + pullPolicy: Never + ingress: + annotations: + kubernetes.io/ingress.class: traefik-azds + hosts: + # This expands to [space.s.]webmvc...aksapp.io + - $(spacePrefix)apigwws$(hostSuffix) + values: + - values.dev.yaml? + - secrets.dev.yaml? + - inf.yaml + - app.yaml +configurations: + develop: + build: + useGitIgnore: true + dockerfile: ..\..\..\ApiGateways\ApiGw-Base\Dockerfile.develop + args: + BUILD_CONFIGURATION: ${BUILD_CONFIGURATION:-Debug} + container: + sync: + - '**/Pages/**' + - '**/Views/**' + - '**/wwwroot/**' + - '!**/*.{sln,csproj}' + command: [dotnet, run, --no-restore, --no-build, --no-launch-profile, -c, "${BUILD_CONFIGURATION:-Debug}"] + iterate: + processesToKill: [dotnet, vsdbg] + buildCommands: + - [dotnet, build, --no-restore, -c, "${BUILD_CONFIGURATION:-Debug}"] diff --git a/src/ApiGateways/Web.Bff.Shopping/apigw/values.dev.yaml b/src/ApiGateways/Web.Bff.Shopping/apigw/values.dev.yaml new file mode 100644 index 000000000..fb59d98d5 --- /dev/null +++ b/src/ApiGateways/Web.Bff.Shopping/apigw/values.dev.yaml @@ -0,0 +1,2 @@ +ocelot: + configPath: /src/src/ApiGateways/ApiGw-Base/configuration \ No newline at end of file diff --git a/src/Services/Basket/Basket.API/Dockerfile.develop b/src/Services/Basket/Basket.API/Dockerfile.develop index cd6252343..5ae5cc235 100644 --- a/src/Services/Basket/Basket.API/Dockerfile.develop +++ b/src/Services/Basket/Basket.API/Dockerfile.develop @@ -1,4 +1,4 @@ -FROM microsoft/dotnet:2.2.100-sdk +FROM microsoft/dotnet:2.2-sdk ARG BUILD_CONFIGURATION=Debug ENV ASPNETCORE_ENVIRONMENT=Development ENV DOTNET_USE_POLLING_FILE_WATCHER=true @@ -9,8 +9,6 @@ WORKDIR /src COPY ["src/BuildingBlocks/EventBus/EventBus/EventBus.csproj", "src/BuildingBlocks/EventBus/EventBus/"] COPY ["src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj", "src/BuildingBlocks/EventBus/EventBusRabbitMQ/"] COPY ["src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj", "src/BuildingBlocks/EventBus/EventBusServiceBus/"] -COPY ["src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/Microsoft.AspNetCore.HealthChecks.csproj", "src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/"] -COPY ["src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/Microsoft.Extensions.HealthChecks.csproj", "src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/"] COPY ["src/Services/Basket/Basket.API/Basket.API.csproj", "src/Services/Basket/Basket.API/"] RUN dotnet restore src/Services/Basket/Basket.API/Basket.API.csproj -nowarn:msb3202,nu1503 @@ -18,4 +16,4 @@ COPY . . WORKDIR /src/src/Services/Basket/Basket.API RUN dotnet build --no-restore -c $BUILD_CONFIGURATION -CMD ["dotnet", "run", "--no-restore", "--no-build", "--no-launch-profile"] \ No newline at end of file +ENTRYPOINT ["dotnet", "run", "--no-build", "--no-launch-profile", "-c", "$BUILD_CONFIGURATION", "--"] \ No newline at end of file diff --git a/src/Services/Basket/Basket.API/app.yaml b/src/Services/Basket/Basket.API/app.yaml deleted file mode 100644 index 6ca5d9d31..000000000 --- a/src/Services/Basket/Basket.API/app.yaml +++ /dev/null @@ -1,43 +0,0 @@ -# This heml values file defines app-based settings -# Charts use those values, so this file **MUST** be included in all chart releases - - -app: # app global settings - name: "my-eshop" # Override for custom app name - ingress: # ingress related settings - entries: - basket: basket-api # ingress entry for basket api - catalog: catalog-api # ingress entry for catalog api - ordering: ordering-api # ingress entry for ordering api - identity: identity # ingress entry for identity api - mvc: webmvc # ingress entry for web mvc - spa: "" # ingress entry for web spa - status: webstatus # ingress entry for web status - webshoppingapigw: webshoppingapigw # ingress entry for web shopping Agw - webmarketingapigw: webmarketingapigw # ingress entry for web mkg Agw - mobilemarketingapigw: mobilemarketingapigw # ingress entry for mobile mkg Agw - mobileshoppingapigw: mobileshoppingapigw # ingress entry for mobile shopping Agw - webshoppingagg: webshoppingagg # ingress entry for web shopping aggregator - mobileshoppingagg: mobileshoppingagg # ingress entry for mobile shopping aggregator - payment: payment-api # ingress entry for payment api - locations: locations-api # ingress entry for locations api - marketing: marketing-api # ingress entry for marketing api - svc: - basket: basket # service name for basket api - catalog: catalog # service name for catalog api - ordering: ordering # service name for ordering api - orderingbackgroundtasks: orderingbackgroundtasks # service name for orderingbackgroundtasks - orderingsignalrhub: orderingsignalrhub # service name for orderingsignalrhub - identity: identity # service name for identity api - mvc: webmvc # service name for web mvc - spa: webspa # service name for web spa - status: webstatus # service name for web status - webshoppingapigw: webshoppingapigw # service name for web shopping Agw - webmarketingapigw: webmarketingapigw # service name for web mkg Agw - mobilemarketingapigw: mobilemarketingapigw # service name for mobile mkg Agw - mobileshoppingapigw: mobileshoppingapigw # service name for mobile shopping Agw - webshoppingagg: webshoppingagg # service name for web shopping aggregator - mobileshoppingagg: mobileshoppingagg # service name for mobile shopping aggregator - payment: payment # service name for payment api - locations: locations # service name for locations api - marketing: marketing # service name for marketing ap diff --git a/src/Services/Basket/Basket.API/azds.yaml b/src/Services/Basket/Basket.API/azds.yaml index 597c79d8c..79baa83db 100644 --- a/src/Services/Basket/Basket.API/azds.yaml +++ b/src/Services/Basket/Basket.API/azds.yaml @@ -1,39 +1,54 @@ kind: helm-release -apiVersion: 1.0 +apiVersion: 1.1 build: context: ..\..\..\.. dockerfile: Dockerfile install: chart: ../../../../k8s/helm/basket-api - values: - - values.dev.yaml? - - secrets.dev.yaml? - - inf.yaml - - app.yaml set: replicaCount: 1 image: tag: $(tag) pullPolicy: Never ingress: + annotations: + kubernetes.io/ingress.class: traefik-azds hosts: # This expands to [space.s.]basketapi...aksapp.io - $(spacePrefix)basketapi$(hostSuffix) + values: + - values.dev.yaml? + - secrets.dev.yaml? + - inf.yaml + - app.yaml configurations: develop: build: - dockerfile: Dockerfile.develop useGitIgnore: true + dockerfile: Dockerfile.develop args: BUILD_CONFIGURATION: ${BUILD_CONFIGURATION:-Debug} container: sync: - - "**/Pages/**" - - "**/Views/**" - - "**/wwwroot/**" - - "!**/*.{sln,csproj}" - command: [dotnet, run, --no-restore, --no-build, --no-launch-profile, -c, "${BUILD_CONFIGURATION:-Debug}"] + - '**/Pages/**' + - '**/Views/**' + - '**/wwwroot/**' + - '!**/*.{sln,csproj}' + command: + - dotnet + - run + - --no-restore + - --no-build + - --no-launch-profile + - -c + - ${BUILD_CONFIGURATION:-Debug} iterate: - processesToKill: [dotnet, vsdbg] + processesToKill: + - dotnet + - vsdbg buildCommands: - - [dotnet, build, --no-restore, -c, "${BUILD_CONFIGURATION:-Debug}"] + - - dotnet + - build + - --no-restore + - -c + - ${BUILD_CONFIGURATION:-Debug} diff --git a/src/Services/Basket/Basket.API/inf.yaml b/src/Services/Basket/Basket.API/inf.yaml deleted file mode 100644 index 3e3e143da..000000000 --- a/src/Services/Basket/Basket.API/inf.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# This heml values file defines all infrastructure used by eShopOnContainers. -# It is used on all charts, so ** MUST BE INCLUDED ** on every deployment - -inf: - redis: # inf.redis defines the redis' connection strings - basket: - svc: basket-data # Name of k8s svc for basket redis - constr: basket-data # Connection string to Redis used by Basket API - eventbus: - svc: rabbitmq # Name of k8s svc for rabbitmq - constr: rabbitmq # Event bus connection string - useAzure: false # true if use Azure Service Bus. False if RabbitMQ - appinsights: - key: "" # App insights to use - k8s: {} - misc: # inf.misc contains miscellaneous configuration related to infrastructure - useLoadTest: false # If running under loading test or not - useAzureStorage: false # If catalog api uses azure storage or not diff --git a/src/Services/Catalog/Catalog.API/Dockerfile.develop b/src/Services/Catalog/Catalog.API/Dockerfile.develop index f6a111386..11034a2bc 100644 --- a/src/Services/Catalog/Catalog.API/Dockerfile.develop +++ b/src/Services/Catalog/Catalog.API/Dockerfile.develop @@ -1,25 +1,21 @@ -FROM microsoft/dotnet:2.2.100-sdk +FROM microsoft/dotnet:2.2-sdk +ARG BUILD_CONFIGURATION=Debug ENV ASPNETCORE_ENVIRONMENT=Development ENV DOTNET_USE_POLLING_FILE_WATCHER=true - EXPOSE 80 WORKDIR /src -COPY ["eShopOnContainers-ServicesAndWebApps.sln", "./"] + COPY ["src/BuildingBlocks/EventBus/EventBus/EventBus.csproj", "src/BuildingBlocks/EventBus/EventBus/"] COPY ["src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj", "src/BuildingBlocks/EventBus/EventBusRabbitMQ/"] COPY ["src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj", "src/BuildingBlocks/EventBus/EventBusServiceBus/"] COPY ["src/BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj", "src/BuildingBlocks/EventBus/IntegrationEventLogEF/"] -COPY ["src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/Microsoft.AspNetCore.HealthChecks.csproj", "src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/"] -COPY ["src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.AzureStorage/Microsoft.Extensions.HealthChecks.AzureStorage.csproj", "src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.AzureStorage/"] -COPY ["src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.SqlServer/Microsoft.Extensions.HealthChecks.SqlServer.csproj", "src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.SqlServer/"] -COPY ["src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/Microsoft.Extensions.HealthChecks.csproj", "src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/"] COPY ["src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj", "src/BuildingBlocks/WebHostCustomization/WebHost.Customization/"] COPY ["src/Services/Catalog/Catalog.API/Catalog.API.csproj", "src/Services/Catalog/Catalog.API/"] RUN dotnet restore src/Services/Catalog/Catalog.API/Catalog.API.csproj -nowarn:msb3202,nu1503 COPY . . WORKDIR "/src/src/Services/Catalog/Catalog.API" -RUN dotnet build "Catalog.API.csproj" +RUN dotnet build --no-restore -c $BUILD_CONFIGURATION -CMD ["dotnet", "run", "--no-restore", "--no-build", "--no-launch-profile"] \ No newline at end of file +ENTRYPOINT ["dotnet", "run", "--no-build", "--no-launch-profile", "-c", "$BUILD_CONFIGURATION", "--"] \ No newline at end of file diff --git a/src/Services/Catalog/Catalog.API/app.yaml b/src/Services/Catalog/Catalog.API/app.yaml deleted file mode 100644 index c6209da47..000000000 --- a/src/Services/Catalog/Catalog.API/app.yaml +++ /dev/null @@ -1,39 +0,0 @@ -app: # app global settings - name: "my-eshop" # Override for custom app name - ingress: # ingress related settings - entries: - basket: basket-api # ingress entry for basket api - catalog: catalog-api # ingress entry for catalog api - ordering: ordering-api # ingress entry for ordering api - identity: identity # ingress entry for identity api - mvc: webmvc # ingress entry for web mvc - spa: "" # ingress entry for web spa - status: webstatus # ingress entry for web status - webshoppingapigw: webshoppingapigw # ingress entry for web shopping Agw - webmarketingapigw: webmarketingapigw # ingress entry for web mkg Agw - mobilemarketingapigw: mobilemarketingapigw # ingress entry for mobile mkg Agw - mobileshoppingapigw: mobileshoppingapigw # ingress entry for mobile shopping Agw - webshoppingagg: webshoppingagg # ingress entry for web shopping aggregator - mobileshoppingagg: mobileshoppingagg # ingress entry for mobile shopping aggregator - payment: payment-api # ingress entry for payment api - locations: locations-api # ingress entry for locations api - marketing: marketing-api # ingress entry for marketing api - svc: - basket: basket # service name for basket api - catalog: catalog # service name for catalog api - ordering: ordering # service name for ordering api - orderingbackgroundtasks: orderingbackgroundtasks # service name for orderingbackgroundtasks - orderingsignalrhub: orderingsignalrhub # service name for orderingsignalrhub - identity: identity # service name for identity api - mvc: webmvc # service name for web mvc - spa: webspa # service name for web spa - status: webstatus # service name for web status - webshoppingapigw: webshoppingapigw # service name for web shopping Agw - webmarketingapigw: webmarketingapigw # service name for web mkg Agw - mobilemarketingapigw: mobilemarketingapigw # service name for mobile mkg Agw - mobileshoppingapigw: mobileshoppingapigw # service name for mobile shopping Agw - webshoppingagg: webshoppingagg # service name for web shopping aggregator - mobileshoppingagg: mobileshoppingagg # service name for mobile shopping aggregator - payment: payment # service name for payment api - locations: locations # service name for locations api - marketing: marketing # service name for marketing api \ No newline at end of file diff --git a/src/Services/Catalog/Catalog.API/azds.yaml b/src/Services/Catalog/Catalog.API/azds.yaml index 7ea0ae087..cbceada43 100644 --- a/src/Services/Catalog/Catalog.API/azds.yaml +++ b/src/Services/Catalog/Catalog.API/azds.yaml @@ -1,41 +1,52 @@ kind: helm-release -apiVersion: 1.0 +apiVersion: 1.1 build: context: ..\..\..\.. dockerfile: Dockerfile install: chart: ../../../../k8s/helm/catalog-api - values: - - values.dev.yaml? - - secrets.dev.yaml? - - inf.yaml - - app.yaml set: image: tag: $(tag) pullPolicy: Never - inf: - k8s: - dns: "$(spacePrefix)basketapi$(hostSuffix)" - disableProbes: true ingress: + annotations: + kubernetes.io/ingress.class: traefik-azds hosts: # This expands to [space.s.]catalogapi...aksapp.io - $(spacePrefix)basketapi$(hostSuffix) + values: + - values.dev.yaml? + - secrets.dev.yaml? + - inf.yaml + - app.yaml configurations: develop: build: - dockerfile: Dockerfile.develop useGitIgnore: true + dockerfile: Dockerfile.develop container: syncTarget: /src sync: - - "**/Pages/**" - - "**/Views/**" - - "**/wwwroot/**" - - "!**/*.{sln,csproj}" - command: [dotnet, run, --no-restore, --no-build, --no-launch-profile, -c, "${Configuration:-Debug}"] + - '**/Pages/**' + - '**/Views/**' + - '**/wwwroot/**' + - '!**/*.{sln,csproj}' + command: + - dotnet + - run + - --no-restore + - --no-build + - --no-launch-profile + - -c + - ${Configuration:-Debug} iterate: - processesToKill: [dotnet, vsdbg] + processesToKill: + - dotnet + - vsdbg buildCommands: - - [dotnet, build, --no-restore, -c, "${Configuration:-Debug}"] + - - dotnet + - build + - --no-restore + - -c + - ${Configuration:-Debug} diff --git a/src/Services/Catalog/Catalog.API/inf.yaml b/src/Services/Catalog/Catalog.API/inf.yaml deleted file mode 100644 index 18e2c04bf..000000000 --- a/src/Services/Catalog/Catalog.API/inf.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# This heml values file defines all infrastructure used by eShopOnContainers. -# It is used on all charts, so ** MUST BE INCLUDED ** on every deployment - -inf: - sql: # inf.sql defines the sql server databases & logins -# host: my-sql-server # Uncomment to specify a custom sql-server to be used. By default "sql-data-" will be used - common: - user: sa # SQL user - pwd: Pass@word # SQL pwd - pid: Developer - catalog: # inf.sql.catalog: settings for the catalog-api sql (user, pwd, db) - db: CatalogDb # Catalog API SQL db name - redis: - keystore: - svc: keystore-data # Name of k8s svc for keystore-data redis - constr: keystore-data # Connection string to Redis used as a Keystore (by Identity API) - eventbus: - svc: rabbitmq # Name of k8s svc for rabbitmq - constr: rabbitmq # Event bus connection string - useAzure: false # true if use Azure Service Bus. False if RabbitMQ - appinsights: - key: "" # App insights to use - k8s: {} - misc: # inf.misc contains miscellaneous configuration related to infrastructure - useLoadTest: false # If running under loading test or not - useAzureStorage: false # If catalog api uses azure storage or not \ No newline at end of file diff --git a/src/Web/WebMVC/app.yaml b/src/Web/WebMVC/app.yaml deleted file mode 100644 index c6209da47..000000000 --- a/src/Web/WebMVC/app.yaml +++ /dev/null @@ -1,39 +0,0 @@ -app: # app global settings - name: "my-eshop" # Override for custom app name - ingress: # ingress related settings - entries: - basket: basket-api # ingress entry for basket api - catalog: catalog-api # ingress entry for catalog api - ordering: ordering-api # ingress entry for ordering api - identity: identity # ingress entry for identity api - mvc: webmvc # ingress entry for web mvc - spa: "" # ingress entry for web spa - status: webstatus # ingress entry for web status - webshoppingapigw: webshoppingapigw # ingress entry for web shopping Agw - webmarketingapigw: webmarketingapigw # ingress entry for web mkg Agw - mobilemarketingapigw: mobilemarketingapigw # ingress entry for mobile mkg Agw - mobileshoppingapigw: mobileshoppingapigw # ingress entry for mobile shopping Agw - webshoppingagg: webshoppingagg # ingress entry for web shopping aggregator - mobileshoppingagg: mobileshoppingagg # ingress entry for mobile shopping aggregator - payment: payment-api # ingress entry for payment api - locations: locations-api # ingress entry for locations api - marketing: marketing-api # ingress entry for marketing api - svc: - basket: basket # service name for basket api - catalog: catalog # service name for catalog api - ordering: ordering # service name for ordering api - orderingbackgroundtasks: orderingbackgroundtasks # service name for orderingbackgroundtasks - orderingsignalrhub: orderingsignalrhub # service name for orderingsignalrhub - identity: identity # service name for identity api - mvc: webmvc # service name for web mvc - spa: webspa # service name for web spa - status: webstatus # service name for web status - webshoppingapigw: webshoppingapigw # service name for web shopping Agw - webmarketingapigw: webmarketingapigw # service name for web mkg Agw - mobilemarketingapigw: mobilemarketingapigw # service name for mobile mkg Agw - mobileshoppingapigw: mobileshoppingapigw # service name for mobile shopping Agw - webshoppingagg: webshoppingagg # service name for web shopping aggregator - mobileshoppingagg: mobileshoppingagg # service name for mobile shopping aggregator - payment: payment # service name for payment api - locations: locations # service name for locations api - marketing: marketing # service name for marketing api \ No newline at end of file diff --git a/src/Web/WebMVC/inf.yaml b/src/Web/WebMVC/inf.yaml deleted file mode 100644 index bac6d51a4..000000000 --- a/src/Web/WebMVC/inf.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# This heml values file defines all infrastructure used by eShopOnContainers. -# It is used on all charts, so ** MUST BE INCLUDED ** on every deployment - -inf: - redis: - keystore: - svc: keystore-data # Name of k8s svc for keystore-data redis - constr: keystore-data # Connection string to Redis used as a Keystore (by Identity API) - appinsights: - key: "" # App insights to use - k8s: {} - eventbus: - svc: rabbitmq # Name of k8s svc for rabbitmq - constr: rabbitmq # Event bus connection string - useAzure: false # true if use Azure Service Bus. False if RabbitMQ - misc: # inf.misc contains miscellaneous configuration related to infrastructure - useLoadTest: false # If running under loading test or not - useAzureStorage: false # If catalog api uses azure storage or not - -ingress: - annotations: -# kubernetes.io/ingress.class: addon-http-application-routing - ingress.kubernetes.io/ssl-redirect: "false" - nginx.ingress.kubernetes.io/ssl-redirect: "false" \ No newline at end of file diff --git a/src/prepare-devspaces.ps1 b/src/prepare-devspaces.ps1 new file mode 100644 index 000000000..b1ffce413 --- /dev/null +++ b/src/prepare-devspaces.ps1 @@ -0,0 +1,42 @@ +# This script just copies app.yaml and inf.yaml files to all devspaces projects. +# This is to workaround issue #56 - https://github.com/Azure/dev-spaces/issues/56 + +Write-Host "Copying app.yaml and inf.yaml to Mobile.Bff.Marketing" -ForegroundColor Yellow +Copy-Item "..\k8s\helm\app.yaml" -Destination ".\ApiGateways\Mobile.Bff.Marketing\apigw" -Force +Copy-Item "..\k8s\helm\inf.yaml" -Destination ".\ApiGateways\Mobile.Bff.Marketing\apigw" -Force + +Write-Host "Copying app.yaml and inf.yaml to Web.Bff.Marketing" -ForegroundColor Yellow +Copy-Item "..\k8s\helm\app.yaml" -Destination ".\ApiGateways\Web.Bff.Marketing\apigw" -Force +Copy-Item "..\k8s\helm\inf.yaml" -Destination ".\ApiGateways\Web.Bff.Marketing\apigw" -Force + +Write-Host "Copying app.yaml and inf.yaml to Mobile.Bff.Shopping" -ForegroundColor Yellow +Copy-Item "..\k8s\helm\app.yaml" -Destination ".\ApiGateways\Mobile.Bff.Shopping\apigw" -Force +Copy-Item "..\k8s\helm\inf.yaml" -Destination ".\ApiGateways\Mobile.Bff.Shopping\apigw" -Force + +Write-Host "Copying app.yaml and inf.yaml to Web.Bff.Shopping" -ForegroundColor Yellow +Copy-Item "..\k8s\helm\app.yaml" -Destination ".\ApiGateways\Web.Bff.Shopping\apigw" -Force +Copy-Item "..\k8s\helm\inf.yaml" -Destination ".\ApiGateways\Web.Bff.Shopping\apigw" -Force + +Write-Host "Copying app.yaml and inf.yaml to Mobile.Bff Shopping Aggregator" -ForegroundColor Yellow +Copy-Item "..\k8s\helm\app.yaml" -Destination ".\ApiGateways\Mobile.Bff.Shopping\aggregator" -Force +Copy-Item "..\k8s\helm\inf.yaml" -Destination ".\ApiGateways\Mobile.Bff.Shopping\aggregator" -Force + +Write-Host "Copying app.yaml and inf.yaml to Web.Bff Shopping Aggregator" -ForegroundColor Yellow +Copy-Item "..\k8s\helm\app.yaml" -Destination ".\ApiGateways\Web.Bff.Shopping\aggregator" -Force +Copy-Item "..\k8s\helm\inf.yaml" -Destination ".\ApiGateways\Web.Bff.Shopping\aggregator" -Force + +Write-Host "Copying app.yaml and inf.yaml to Basket API" -ForegroundColor Yellow +Copy-Item "..\k8s\helm\app.yaml" -Destination ".\Services\Basket\Basket.API" -Force +Copy-Item "..\k8s\helm\inf.yaml" -Destination ".\Services\Basket\Basket.API" -Force + +Write-Host "Copying app.yaml and inf.yaml to Catalog API" -ForegroundColor Yellow +Copy-Item "..\k8s\helm\app.yaml" -Destination ".\Services\Catalog\Catalog.API" -Force +Copy-Item "..\k8s\helm\inf.yaml" -Destination ".\Services\Catalog\Catalog.API" -Force + +Write-Host "Copying app.yaml and inf.yaml to WebMVC" -ForegroundColor Yellow +Copy-Item "..\k8s\helm\app.yaml" -Destination ".\Web\WebMVC" -Force +Copy-Item "..\k8s\helm\inf.yaml" -Destination ".\Web\WebMVC" -Force + + + +