From 89a0695779172f1e8d11131f3dc70a9784792ccf Mon Sep 17 00:00:00 2001 From: eiximenis Date: Mon, 25 Feb 2019 16:10:45 +0100 Subject: [PATCH] Locations API devspaces --- .../Location/Locations.API/Dockerfile.develop | 17 ++++++ src/Services/Location/Locations.API/azds.yaml | 54 +++++++++++++++++++ src/prepare-devspaces.ps1 | 4 ++ 3 files changed, 75 insertions(+) create mode 100644 src/Services/Location/Locations.API/Dockerfile.develop create mode 100644 src/Services/Location/Locations.API/azds.yaml diff --git a/src/Services/Location/Locations.API/Dockerfile.develop b/src/Services/Location/Locations.API/Dockerfile.develop new file mode 100644 index 000000000..a847b6c30 --- /dev/null +++ b/src/Services/Location/Locations.API/Dockerfile.develop @@ -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", "--"] diff --git a/src/Services/Location/Locations.API/azds.yaml b/src/Services/Location/Locations.API/azds.yaml new file mode 100644 index 000000000..f528f62cd --- /dev/null +++ b/src/Services/Location/Locations.API/azds.yaml @@ -0,0 +1,54 @@ +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: + # This expands to [space.s.]identity...aksapp.io + - $(spacePrefix)locations-api$(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} diff --git a/src/prepare-devspaces.ps1 b/src/prepare-devspaces.ps1 index 2bb7f4135..e79dbd4ab 100644 --- a/src/prepare-devspaces.ps1 +++ b/src/prepare-devspaces.ps1 @@ -37,6 +37,10 @@ Write-Host "Copying app.yaml and inf.yaml to Identity API" -ForegroundColor Yell Copy-Item "..\k8s\helm\app.yaml" -Destination ".\Services\Identity\Identity.API" -Force Copy-Item "..\k8s\helm\inf.yaml" -Destination ".\Services\Identity\Identity.API" -Force +Write-Host "Copying app.yaml and inf.yaml to Locations API" -ForegroundColor Yellow +Copy-Item "..\k8s\helm\app.yaml" -Destination ".\Services\Location\Locations.API" -Force +Copy-Item "..\k8s\helm\inf.yaml" -Destination ".\Services\Location\Locations.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