eShopOnContainers forkpull/1934/head
@ -0,0 +1,26 @@ | |||||
Param( | |||||
[parameter(Mandatory=$true)][string]$registry | |||||
) | |||||
if ([String]::IsNullOrEmpty($registry)) { | |||||
Write-Host "Registry must be set to docker registry to use" -ForegroundColor Red | |||||
exit 1 | |||||
} | |||||
Write-Host "This script creates the local manifests, for pushing the multi-arch manifests" -ForegroundColor Yellow | |||||
Write-Host "Tags used are linux-master, win-master, linux-dev, win-dev, linux-latest, win-latest" -ForegroundColor Yellow | |||||
Write-Host "Multiarch images tags will be master, dev, latest" -ForegroundColor Yellow | |||||
$services = "identity.api", "basket.api", "catalog.api", "ordering.api", "ordering.backgroundtasks", "marketing.api", "payment.api", "locations.api", "webhooks.api", "ocelotapigw", "mobileshoppingagg", "webshoppingagg", "ordering.signalrhub", "webstatus", "webspa", "webmvc", "webhooks.client" | |||||
foreach ($svc in $services) { | |||||
Write-Host "Creating manifest for $svc and tags :latest, :master, and :dev" | |||||
docker manifest create $registry/${svc}:master $registry/${svc}:linux-master $registry/${svc}:win-master | |||||
docker manifest create $registry/${svc}:dev $registry/${svc}:linux-dev $registry/${svc}:win-dev | |||||
docker manifest create $registry/${svc}:latest $registry/${svc}:linux-latest $registry/${svc}:win-latest | |||||
Write-Host "Pushing manifest for $svc and tags :latest, :master, and :dev" | |||||
docker manifest push $registry/${svc}:latest | |||||
docker manifest push $registry/${svc}:dev | |||||
docker manifest push $registry/${svc}:master | |||||
} |
@ -1,8 +0,0 @@ | |||||
#!/bin/sh | |||||
export NODE_DOWNLOAD_SHA 0e20787e2eda4cc31336d8327556ebc7417e8ee0a6ba0de96a09b0ec2b841f60 | |||||
curl -SL "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.gz" --output nodejs.tar.gz \ | |||||
&& echo "$NODE_DOWNLOAD_SHA nodejs.tar.gz" | sha256sum -c - \ | |||||
&& tar -xzf "nodejs.tar.gz" -C /usr/local --strip-components=1 \ | |||||
&& rm nodejs.tar.gz \ | |||||
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs |
@ -1,4 +0,0 @@ | |||||
set NODE_VERSION=8.11.1 | |||||
curl -SL "https://nodejs.org/dist/v%NODE_VERSION%/node-v%NODE_VERSION%-win-x64.zip" --output nodejs.zip | |||||
tar -xf nodejs.zip -C c:\ | |||||
setx PATH "%PATH%;c:\node-v%NODE_VERSION%-win-x64" |
@ -0,0 +1,37 @@ | |||||
{{- if .Values.ingress.enabled -}} | |||||
{{- $ingressPath := include "pathBase" . -}} | |||||
{{- $serviceName := .Values.app.svc.basket -}} | |||||
apiVersion: extensions/v1beta1 | |||||
kind: Ingress | |||||
metadata: | |||||
name: {{ template "basket-api.fullname" . }} | |||||
labels: | |||||
app: {{ template "basket-api.name" . }} | |||||
chart: {{ template "basket-api.chart" . }} | |||||
release: {{ .Release.Name }} | |||||
heritage: {{ .Release.Service }} | |||||
{{- with .Values.ingress.annotations }} | |||||
annotations: | |||||
{{ toYaml . | indent 4 }} | |||||
{{- end }} | |||||
spec: | |||||
{{- if .Values.ingress.tls }} | |||||
tls: | |||||
{{- range .Values.ingress.tls }} | |||||
- hosts: | |||||
- {{ .Values.inf.k8s.dns }} | |||||
secretName: {{ .secretName }} | |||||
{{- end }} | |||||
{{- end }} | |||||
rules: | |||||
{{- range .Values.ingress.hosts }} | |||||
- host: {{ . }} | |||||
http: | |||||
paths: | |||||
- path: {{ $ingressPath }} | |||||
backend: | |||||
serviceName: {{ $serviceName }} | |||||
servicePort: http | |||||
{{- end }} | |||||
{{- end }} |
@ -0,0 +1,37 @@ | |||||
{{- if .Values.ingress.enabled -}} | |||||
{{- $ingressPath := include "pathBase" . -}} | |||||
{{- $serviceName := .Values.app.svc.catalog -}} | |||||
apiVersion: extensions/v1beta1 | |||||
kind: Ingress | |||||
metadata: | |||||
name: {{ template "catalog-api.fullname" . }} | |||||
labels: | |||||
app: {{ template "catalog-api.name" . }} | |||||
chart: {{ template "catalog-api.chart" . }} | |||||
release: {{ .Release.Name }} | |||||
heritage: {{ .Release.Service }} | |||||
{{- with .Values.ingress.annotations }} | |||||
annotations: | |||||
{{ toYaml . | indent 4 }} | |||||
{{- end }} | |||||
spec: | |||||
{{- if .Values.ingress.tls }} | |||||
tls: | |||||
{{- range .Values.ingress.tls }} | |||||
- hosts: | |||||
- {{ .Values.inf.k8s.dns }} | |||||
secretName: {{ .secretName }} | |||||
{{- end }} | |||||
{{- end }} | |||||
rules: | |||||
{{- range .Values.ingress.hosts }} | |||||
- host: {{ . }} | |||||
http: | |||||
paths: | |||||
- path: {{ $ingressPath }} | |||||
backend: | |||||
serviceName: {{ $serviceName }} | |||||
servicePort: http | |||||
{{- end }} | |||||
{{- end }} |
@ -0,0 +1,36 @@ | |||||
{{- if .Values.ingress.enabled -}} | |||||
{{- $ingressPath := include "pathBase" . -}} | |||||
{{- $serviceName := .Values.app.svc.locations }} | |||||
apiVersion: extensions/v1beta1 | |||||
kind: Ingress | |||||
metadata: | |||||
name: {{ template "locations-api.fullname" . }} | |||||
labels: | |||||
app: {{ template "locations-api.name" . }} | |||||
chart: {{ template "locations-api.chart" . }} | |||||
release: {{ .Release.Name }} | |||||
heritage: {{ .Release.Service }} | |||||
{{- with .Values.ingress.annotations }} | |||||
annotations: | |||||
{{ toYaml . | indent 4 }} | |||||
{{- end }} | |||||
spec: | |||||
{{- if .Values.ingress.tls }} | |||||
tls: | |||||
{{- range .Values.ingress.tls }} | |||||
- hosts: | |||||
- {{ .Values.inf.k8s.dns }} | |||||
secretName: {{ .secretName }} | |||||
{{- end }} | |||||
{{- end }} | |||||
rules: | |||||
{{- range .Values.ingress.hosts }} | |||||
- host: {{ . }} | |||||
http: | |||||
paths: | |||||
- path: {{ $ingressPath }} | |||||
backend: | |||||
serviceName: {{ $serviceName }} | |||||
servicePort: http | |||||
{{- end }} | |||||
{{- end }} |
@ -0,0 +1,36 @@ | |||||
{{- if .Values.ingress.enabled -}} | |||||
{{- $ingressPath := include "pathBase" . -}} | |||||
{{- $serviceName := .Values.app.svc.marketing }} | |||||
apiVersion: extensions/v1beta1 | |||||
kind: Ingress | |||||
metadata: | |||||
name: {{ template "marketing-api.fullname" . }} | |||||
labels: | |||||
app: {{ template "marketing-api.name" . }} | |||||
chart: {{ template "marketing-api.chart" . }} | |||||
release: {{ .Release.Name }} | |||||
heritage: {{ .Release.Service }} | |||||
{{- with .Values.ingress.annotations }} | |||||
annotations: | |||||
{{ toYaml . | indent 4 }} | |||||
{{- end }} | |||||
spec: | |||||
{{- if .Values.ingress.tls }} | |||||
tls: | |||||
{{- range .Values.ingress.tls }} | |||||
- hosts: | |||||
- {{ .Values.inf.k8s.dns }} | |||||
secretName: {{ .secretName }} | |||||
{{- end }} | |||||
{{- end }} | |||||
rules: | |||||
{{- range .Values.ingress.hosts }} | |||||
- host: {{ . }} | |||||
http: | |||||
paths: | |||||
- path: {{ $ingressPath }} | |||||
backend: | |||||
serviceName: {{ $serviceName }} | |||||
servicePort: http | |||||
{{- end }} | |||||
{{- end }} |
@ -0,0 +1,36 @@ | |||||
{{- if .Values.ingress.enabled -}} | |||||
{{- $ingressPath := include "pathBase" . -}} | |||||
{{- $serviceName := .Values.app.svc.mobileshoppingagg }} | |||||
apiVersion: extensions/v1beta1 | |||||
kind: Ingress | |||||
metadata: | |||||
name: {{ template "mobileshoppingagg.fullname" . }} | |||||
labels: | |||||
app: {{ template "mobileshoppingagg.name" . }} | |||||
chart: {{ template "mobileshoppingagg.chart" . }} | |||||
release: {{ .Release.Name }} | |||||
heritage: {{ .Release.Service }} | |||||
{{- with .Values.ingress.annotations }} | |||||
annotations: | |||||
{{ toYaml . | indent 4 }} | |||||
{{- end }} | |||||
spec: | |||||
{{- if .Values.ingress.tls }} | |||||
tls: | |||||
{{- range .Values.ingress.tls }} | |||||
- hosts: | |||||
- {{ .Values.inf.k8s.dns }} | |||||
secretName: {{ .secretName }} | |||||
{{- end }} | |||||
{{- end }} | |||||
rules: | |||||
{{- range .Values.ingress.hosts }} | |||||
- host: {{ . }} | |||||
http: | |||||
paths: | |||||
- path: {{ $ingressPath }} | |||||
backend: | |||||
serviceName: {{ $serviceName }} | |||||
servicePort: http | |||||
{{- end }} | |||||
{{- end }} |
@ -0,0 +1,36 @@ | |||||
{{- if .Values.ingress.enabled -}} | |||||
{{- $ingressPath := include "pathBase" . -}} | |||||
{{- $serviceName := .Values.app.svc.webshoppingagg }} | |||||
apiVersion: extensions/v1beta1 | |||||
kind: Ingress | |||||
metadata: | |||||
name: {{ template "webshoppingagg.fullname" . }} | |||||
labels: | |||||
app: {{ template "webshoppingagg.name" . }} | |||||
chart: {{ template "webshoppingagg.chart" . }} | |||||
release: {{ .Release.Name }} | |||||
heritage: {{ .Release.Service }} | |||||
{{- with .Values.ingress.annotations }} | |||||
annotations: | |||||
{{ toYaml . | indent 4 }} | |||||
{{- end }} | |||||
spec: | |||||
{{- if .Values.ingress.tls }} | |||||
tls: | |||||
{{- range .Values.ingress.tls }} | |||||
- hosts: | |||||
- {{ .Values.inf.k8s.dns }} | |||||
secretName: {{ .secretName }} | |||||
{{- end }} | |||||
{{- end }} | |||||
rules: | |||||
{{- range .Values.ingress.hosts }} | |||||
- host: {{ . }} | |||||
http: | |||||
paths: | |||||
- path: {{ $ingressPath }} | |||||
backend: | |||||
serviceName: {{ $serviceName }} | |||||
servicePort: http | |||||
{{- end }} | |||||
{{- end }} |
@ -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", "--"] |
@ -0,0 +1,44 @@ | |||||
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.<guid>.<region>.aksapp.io | |||||
- $(spacePrefix)eshop$(hostSuffix) | |||||
inf: | |||||
k8s: | |||||
dns: $(spacePrefix)eshop$(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}"] |
@ -0,0 +1,2 @@ | |||||
ocelot: | |||||
configPath: /src/src/ApiGateways/ApiGw-Base/configuration |
@ -0,0 +1,16 @@ | |||||
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/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator.csproj", "src/ApiGateways/Mobile.Bff.Shopping/aggregator/"] | |||||
COPY ["src/BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj", "src/BuildingBlocks/Devspaces.Support/"] | |||||
RUN dotnet restore src/ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator.csproj -nowarn:msb3202,nu1503 | |||||
COPY . . | |||||
WORKDIR "/src/src/ApiGateways/Mobile.Bff.Shopping/aggregator" | |||||
RUN dotnet build --no-restore -c $BUILD_CONFIGURATION | |||||
CMD ["dotnet", "run", "--no-build", "--no-launch-profile", "-c", "$BUILD_CONFIGURATION", "--"]] |
@ -0,0 +1,55 @@ | |||||
kind: helm-release | |||||
apiVersion: 1.1 | |||||
build: | |||||
context: ..\..\..\.. | |||||
dockerfile: Dockerfile | |||||
install: | |||||
chart: ../../../../k8s/helm/mobileshoppingagg | |||||
set: | |||||
image: | |||||
tag: $(tag) | |||||
pullPolicy: Never | |||||
ingress: | |||||
annotations: | |||||
kubernetes.io/ingress.class: traefik-azds | |||||
hosts: | |||||
# This expands to [space.s.]apigwms.<guid>.<region>.aksapp.io | |||||
- $(spacePrefix)eshop$(hostSuffix) | |||||
inf: | |||||
k8s: | |||||
dns: $(spacePrefix)eshop$(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} |
@ -0,0 +1,3 @@ | |||||
ingress: | |||||
enabled: true | |||||
tls: [] |
@ -0,0 +1,44 @@ | |||||
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.<guid>.<region>.aksapp.io | |||||
- $(spacePrefix)eshop$(hostSuffix) | |||||
inf: | |||||
k8s: | |||||
dns: $(spacePrefix)eshop$(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}"] |
@ -0,0 +1,2 @@ | |||||
ocelot: | |||||
configPath: /src/src/ApiGateways/ApiGw-Base/configuration |
@ -0,0 +1,44 @@ | |||||
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.<guid>.<region>.aksapp.io | |||||
- $(spacePrefix)eshop$(hostSuffix) | |||||
inf: | |||||
k8s: | |||||
dns: $(spacePrefix)eshop$(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}"] |
@ -0,0 +1,2 @@ | |||||
ocelot: | |||||
configPath: /src/src/ApiGateways/ApiGw-Base/configuration |
@ -0,0 +1,16 @@ | |||||
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/"] | |||||
COPY ["src/BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj", "src/BuildingBlocks/Devspaces.Support/"] | |||||
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", "--"]] |
@ -0,0 +1,55 @@ | |||||
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.<guid>.<region>.aksapp.io | |||||
- $(spacePrefix)eshop$(hostSuffix) | |||||
inf: | |||||
k8s: | |||||
dns: $(spacePrefix)eshop$(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} |
@ -0,0 +1,2 @@ | |||||
ocelot: | |||||
configPath: /app/configuration |
@ -0,0 +1,43 @@ | |||||
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: | |||||
- $(spacePrefix)eshop$(hostSuffix) | |||||
inf: | |||||
k8s: | |||||
dns: $(spacePrefix)eshop$(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}"] |
@ -0,0 +1,2 @@ | |||||
ocelot: | |||||
configPath: /src/src/ApiGateways/ApiGw-Base/configuration |
@ -0,0 +1,11 @@ | |||||
<Project Sdk="Microsoft.NET.Sdk"> | |||||
<PropertyGroup> | |||||
<TargetFramework>netstandard2.0</TargetFramework> | |||||
</PropertyGroup> | |||||
<ItemGroup> | |||||
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" /> | |||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="2.2.0" /> | |||||
<PackageReference Include="Microsoft.Extensions.Http" Version="2.2.0" /> | |||||
</ItemGroup> | |||||
</Project> |
@ -0,0 +1,30 @@ | |||||
using Microsoft.AspNetCore.Http; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Net.Http; | |||||
using System.Threading; | |||||
using System.Threading.Tasks; | |||||
namespace Devspaces.Support | |||||
{ | |||||
public class DevspacesMessageHandler : DelegatingHandler | |||||
{ | |||||
private const string DevspacesHeaderName = "azds-route-as"; | |||||
private readonly IHttpContextAccessor _httpContextAccessor; | |||||
public DevspacesMessageHandler(IHttpContextAccessor httpContextAccessor) | |||||
{ | |||||
_httpContextAccessor = httpContextAccessor; | |||||
} | |||||
protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) | |||||
{ | |||||
var req = _httpContextAccessor.HttpContext.Request; | |||||
if (req.Headers.ContainsKey(DevspacesHeaderName)) | |||||
{ | |||||
request.Headers.Add(DevspacesHeaderName, req.Headers[DevspacesHeaderName] as IEnumerable<string>); | |||||
} | |||||
return base.SendAsync(request, cancellationToken); | |||||
} | |||||
} | |||||
} |
@ -0,0 +1,16 @@ | |||||
using Microsoft.Extensions.DependencyInjection; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Text; | |||||
namespace Devspaces.Support | |||||
{ | |||||
public static class HttpClientBuilderDevspacesExtensions | |||||
{ | |||||
public static IHttpClientBuilder AddDevspacesSupport(this IHttpClientBuilder builder) | |||||
{ | |||||
builder.AddHttpMessageHandler<DevspacesMessageHandler>(); | |||||
return builder; | |||||
} | |||||
} | |||||
} |
@ -0,0 +1,16 @@ | |||||
using Microsoft.Extensions.DependencyInjection; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Text; | |||||
namespace Devspaces.Support | |||||
{ | |||||
public static class ServiceCollectionDevspacesExtensions | |||||
{ | |||||
public static IServiceCollection AddDevspaces(this IServiceCollection services) | |||||
{ | |||||
services.AddTransient<DevspacesMessageHandler>(); | |||||
return services; | |||||
} | |||||
} | |||||
} |
@ -0,0 +1,14 @@ | |||||
.dockerignore | |||||
.git | |||||
.gitignore | |||||
.vs | |||||
.vscode | |||||
**/*.*proj.user | |||||
**/azds.yaml | |||||
**/bin | |||||
**/charts | |||||
**/Dockerfile | |||||
**/Dockerfile.develop | |||||
**/obj | |||||
**/secrets.dev.yaml | |||||
**/values.dev.yaml |
@ -0,0 +1,19 @@ | |||||
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/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/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 | |||||
COPY . . | |||||
WORKDIR /src/src/Services/Basket/Basket.API | |||||
RUN dotnet build --no-restore -c $BUILD_CONFIGURATION | |||||
ENTRYPOINT ["dotnet", "run", "--no-build", "--no-launch-profile", "-c", "$BUILD_CONFIGURATION", "--"] |
@ -0,0 +1,56 @@ | |||||
kind: helm-release | |||||
apiVersion: 1.1 | |||||
build: | |||||
context: ..\..\..\.. | |||||
dockerfile: Dockerfile | |||||
install: | |||||
chart: ../../../../k8s/helm/basket-api | |||||
set: | |||||
replicaCount: 1 | |||||
image: | |||||
tag: $(tag) | |||||
pullPolicy: Never | |||||
ingress: | |||||
annotations: | |||||
kubernetes.io/ingress.class: traefik-azds | |||||
hosts: | |||||
- $(spacePrefix)eshop$(hostSuffix) | |||||
inf: | |||||
k8s: | |||||
dns: $(spacePrefix)eshop$(hostSuffix) | |||||
values: | |||||
- values.dev.yaml? | |||||
- secrets.dev.yaml? | |||||
- inf.yaml | |||||
- app.yaml | |||||
configurations: | |||||
develop: | |||||
build: | |||||
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} | |||||
iterate: | |||||
processesToKill: | |||||
- dotnet | |||||
- vsdbg | |||||
buildCommands: | |||||
- - dotnet | |||||
- build | |||||
- --no-restore | |||||
- -c | |||||
- ${BUILD_CONFIGURATION:-Debug} |
@ -0,0 +1,3 @@ | |||||
ingress: | |||||
enabled: true | |||||
tls: [] |
@ -0,0 +1,21 @@ | |||||
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/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/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 --no-restore -c $BUILD_CONFIGURATION | |||||
ENTRYPOINT ["dotnet", "run", "--no-build", "--no-launch-profile", "-c", "$BUILD_CONFIGURATION", "--"] |
@ -0,0 +1,54 @@ | |||||
kind: helm-release | |||||
apiVersion: 1.1 | |||||
build: | |||||
context: ..\..\..\.. | |||||
dockerfile: Dockerfile | |||||
install: | |||||
chart: ../../../../k8s/helm/catalog-api | |||||
set: | |||||
image: | |||||
tag: $(tag) | |||||
pullPolicy: Never | |||||
ingress: | |||||
annotations: | |||||
kubernetes.io/ingress.class: traefik-azds | |||||
hosts: | |||||
- $(spacePrefix)eshop$(hostSuffix) | |||||
inf: | |||||
k8s: | |||||
dns: $(spacePrefix)eshop$(hostSuffix) | |||||
values: | |||||
- values.dev.yaml? | |||||
- secrets.dev.yaml? | |||||
- inf.yaml | |||||
- app.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} |
@ -0,0 +1,3 @@ | |||||
ingress: | |||||
enabled: true | |||||
tls: [] |
@ -0,0 +1,14 @@ | |||||
.dockerignore | |||||
.git | |||||
.gitignore | |||||
.vs | |||||
.vscode | |||||
**/*.*proj.user | |||||
**/azds.yaml | |||||
**/bin | |||||
**/charts | |||||
**/Dockerfile | |||||
**/Dockerfile.develop | |||||
**/obj | |||||
**/secrets.dev.yaml | |||||
**/values.dev.yaml |
@ -0,0 +1,31 @@ | |||||
using IdentityServer4.Models; | |||||
using IdentityServer4.Validation; | |||||
using Microsoft.Extensions.Logging; | |||||
using System.Threading.Tasks; | |||||
namespace Microsoft.eShopOnContainers.Services.Identity.API.Devspaces | |||||
{ | |||||
public class DevspacesRedirectUriValidator : IRedirectUriValidator | |||||
{ | |||||
private readonly ILogger _logger; | |||||
public DevspacesRedirectUriValidator(ILogger<DevspacesRedirectUriValidator> logger) | |||||
{ | |||||
_logger = logger; | |||||
} | |||||
public Task<bool> IsPostLogoutRedirectUriValidAsync(string requestedUri, Client client) | |||||
{ | |||||
_logger.LogInformation($"Client {client.ClientName} used post logout uri {requestedUri}."); | |||||
return Task.FromResult(true); | |||||
} | |||||
public Task<bool> IsRedirectUriValidAsync(string requestedUri, Client client) | |||||
{ | |||||
_logger.LogInformation($"Client {client.ClientName} used redirect uri {requestedUri}."); | |||||
return Task.FromResult(true); | |||||
} | |||||
} | |||||
} |
@ -0,0 +1,20 @@ | |||||
using Microsoft.Extensions.DependencyInjection; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Threading.Tasks; | |||||
namespace Microsoft.eShopOnContainers.Services.Identity.API.Devspaces | |||||
{ | |||||
static class IdentityDevspacesBuilderExtensions | |||||
{ | |||||
public static IIdentityServerBuilder AddDevspacesIfNeeded(this IIdentityServerBuilder builder, bool useDevspaces) | |||||
{ | |||||
if (useDevspaces) | |||||
{ | |||||
builder.AddRedirectUriValidator<DevspacesRedirectUriValidator>(); | |||||
} | |||||
return builder; | |||||
} | |||||
} | |||||
} |
@ -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/Services/Identity/Identity.API/Identity.API.csproj", "src/Services/Identity/Identity.API/"] | |||||
COPY ["src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj", "src/BuildingBlocks/WebHostCustomization/WebHost.Customization/"] | |||||
RUN dotnet restore src/Services/Identity/Identity.API/Identity.API.csproj -nowarn:msb3202,nu1503 | |||||
COPY . . | |||||
WORKDIR "/src/src/Services/Identity/Identity.API" | |||||
RUN dotnet build --no-restore -c $BUILD_CONFIGURATION | |||||
ENTRYPOINT ["dotnet", "run", "--no-build", "--no-launch-profile", "-c", "$BUILD_CONFIGURATION", "--"] |
@ -0,0 +1,56 @@ | |||||
kind: helm-release | |||||
apiVersion: 1.1 | |||||
build: | |||||
context: ..\..\..\.. | |||||
dockerfile: Dockerfile | |||||
install: | |||||
chart: ../../../../k8s/helm/identity-api | |||||
set: | |||||
replicaCount: 1 | |||||
image: | |||||
tag: $(tag) | |||||
pullPolicy: Never | |||||
ingress: | |||||
annotations: | |||||
kubernetes.io/ingress.class: traefik-azds | |||||
hosts: | |||||
- $(spacePrefix)eshop$(hostSuffix) | |||||
inf: | |||||
k8s: | |||||
dns: $(spacePrefix)eshop$(hostSuffix) | |||||
values: | |||||
- values.dev.yaml? | |||||
- secrets.dev.yaml? | |||||
- inf.yaml | |||||
- app.yaml | |||||
configurations: | |||||
develop: | |||||
build: | |||||
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} | |||||
iterate: | |||||
processesToKill: | |||||
- dotnet | |||||
- vsdbg | |||||
buildCommands: | |||||
- - dotnet | |||||
- build | |||||
- --no-restore | |||||
- -c | |||||
- ${BUILD_CONFIGURATION:-Debug} |
@ -0,0 +1 @@ | |||||
enableDevspaces: "true" |
@ -0,0 +1,17 @@ | |||||
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/Services/Location/Locations.API/Locations.API.csproj", "src/Services/Location/Locations.API/"] | |||||
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/"] | |||||
RUN dotnet restore src/Services/Location/Locations.API/Locations.API.csproj -nowarn:msb3202,nu1503 | |||||
COPY . . | |||||
WORKDIR "/src/src/Services/Location/Locations.API" | |||||
RUN dotnet build --no-restore -c $BUILD_CONFIGURATION | |||||
ENTRYPOINT ["dotnet", "run", "--no-build", "--no-launch-profile", "-c", "$BUILD_CONFIGURATION", "--"] |
@ -0,0 +1,56 @@ | |||||
kind: helm-release | |||||
apiVersion: 1.1 | |||||
build: | |||||
context: ..\..\..\.. | |||||
dockerfile: Dockerfile | |||||
install: | |||||
chart: ../../../../k8s/helm/locations-api | |||||
set: | |||||
replicaCount: 1 | |||||
image: | |||||
tag: $(tag) | |||||
pullPolicy: Never | |||||
ingress: | |||||
annotations: | |||||
kubernetes.io/ingress.class: traefik-azds | |||||
hosts: | |||||
- $(spacePrefix)eshop$(hostSuffix) | |||||
inf: | |||||
k8s: | |||||
dns: $(spacePrefix)eshop$(hostSuffix) | |||||
values: | |||||
- values.dev.yaml? | |||||
- secrets.dev.yaml? | |||||
- inf.yaml | |||||
- app.yaml | |||||
configurations: | |||||
develop: | |||||
build: | |||||
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} | |||||
iterate: | |||||
processesToKill: | |||||
- dotnet | |||||
- vsdbg | |||||
buildCommands: | |||||
- - dotnet | |||||
- build | |||||
- --no-restore | |||||
- -c | |||||
- ${BUILD_CONFIGURATION:-Debug} |
@ -0,0 +1,3 @@ | |||||
ingress: | |||||
enabled: true | |||||
tls: [] |
@ -0,0 +1,18 @@ | |||||
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/Services/Marketing/Marketing.API/Marketing.API.csproj", "src/Services/Marketing/Marketing.API/"] | |||||
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/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj", "src/BuildingBlocks/WebHostCustomization/WebHost.Customization/"] | |||||
RUN dotnet restore src/Services/Marketing/Marketing.API/Marketing.API.csproj -nowarn:msb3202,nu1503 | |||||
COPY . . | |||||
WORKDIR "/src/src/Services/Marketing/Marketing.API" | |||||
RUN dotnet build --no-restore -c $BUILD_CONFIGURATION | |||||
ENTRYPOINT ["dotnet", "run", "--no-build", "--no-launch-profile", "-c", "$BUILD_CONFIGURATION", "--"] |