Fixes #630
This commit is contained in:
parent
de68b4c342
commit
fcff8e45aa
@ -25,8 +25,8 @@ $env:ESHOP_AZURE_STORAGE_CATALOG_URL ="http://10.0.75.1:5101/api/v1/catalog/item
|
||||
$env:ESHOP_AZURE_STORAGE_MARKETING_URL ="http://10.0.75.1:5110/api/v1/campaigns/[0]/pic/"
|
||||
|
||||
if (-Not $customEventBusLoginPassword) {
|
||||
docker-compose -f "$rootPath\docker-compose-windows.yml" -f "$rootPath\docker-compose.override.yml" -f "$rootPath\docker-compose.override.windows.yml" up
|
||||
docker-compose -f "$rootPath\docker-compose.yml" -f "$rootPath\docker-compose.override.yml" -f "$rootPath\docker-compose.windows.yml" -f "$rootPath\docker-compose.override.windows.yml" up
|
||||
}
|
||||
else {
|
||||
docker-compose -f "$rootPath\docker-compose-windows.yml" -f "$rootPath\docker-compose.override.yml" up
|
||||
docker-compose -f "$rootPath\docker-compose.yml" -f "$rootPath\docker-compose.override.yml" -f "$rootPath\docker-compose.windows.yml" up
|
||||
}
|
||||
|
@ -1,138 +0,0 @@
|
||||
version: '3.4'
|
||||
|
||||
services:
|
||||
basket.api:
|
||||
image: eshop/basket.api-win:${TAG:-latest}
|
||||
build:
|
||||
context: .
|
||||
dockerfile: src/Services/Basket/Basket.API/Dockerfile
|
||||
depends_on:
|
||||
- basket.data
|
||||
- identity.api
|
||||
- rabbitmq
|
||||
|
||||
catalog.api:
|
||||
image: eshop/catalog.api-win:${TAG:-latest}
|
||||
build:
|
||||
context: .
|
||||
dockerfile: src/Services/Catalog/Catalog.API/Dockerfile
|
||||
depends_on:
|
||||
- sql.data
|
||||
- rabbitmq
|
||||
|
||||
identity.api:
|
||||
image: eshop/identity.api-win:${TAG:-latest}
|
||||
build:
|
||||
context: .
|
||||
dockerfile: src/Services/Identity/Identity.API/Dockerfile
|
||||
depends_on:
|
||||
- sql.data
|
||||
|
||||
ordering.api:
|
||||
image: eshop/ordering.api-win:${TAG:-latest}
|
||||
build:
|
||||
context: .
|
||||
dockerfile: src/Services/Ordering/Ordering.API/Dockerfile
|
||||
depends_on:
|
||||
- sql.data
|
||||
- rabbitmq
|
||||
|
||||
ordering.backgroundtasks:
|
||||
image: eshop/ordering.backgroundtasks-win:${TAG:-latest}
|
||||
build:
|
||||
context: .
|
||||
dockerfile: src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile
|
||||
depends_on:
|
||||
- sql.data
|
||||
- rabbitmq
|
||||
|
||||
ordering.signalrhub:
|
||||
image: eshop/ordering.signalrhub:${TAG:-latest}
|
||||
build:
|
||||
context: .
|
||||
dockerfile: src/Services/Ordering/Ordering.SignalrHub/Dockerfile
|
||||
depends_on:
|
||||
- sql.data
|
||||
- identity.api
|
||||
- rabbitmq
|
||||
|
||||
marketing.api:
|
||||
image: eshop/marketing.api-win:${TAG:-latest}
|
||||
build:
|
||||
context: .
|
||||
dockerfile: src/Services/Marketing/Marketing.API/Dockerfile
|
||||
depends_on:
|
||||
- sql.data
|
||||
- nosql.data
|
||||
- identity.api
|
||||
- rabbitmq
|
||||
|
||||
webspa:
|
||||
image: eshop/webspa-win:${TAG:-latest}
|
||||
build:
|
||||
context: .
|
||||
dockerfile: src/Web/WebSPA/Dockerfile
|
||||
depends_on:
|
||||
- catalog.api
|
||||
- ordering.api
|
||||
- identity.api
|
||||
- basket.api
|
||||
- marketing.api
|
||||
|
||||
webmvc:
|
||||
image: eshop/webmvc-win:${TAG:-latest}
|
||||
build:
|
||||
context: .
|
||||
dockerfile: src/Web/WebMVC/Dockerfile
|
||||
depends_on:
|
||||
- catalog.api
|
||||
- ordering.api
|
||||
- identity.api
|
||||
- basket.api
|
||||
- marketing.api
|
||||
|
||||
webstatus:
|
||||
image: eshop/webstatus-win:${TAG:-latest}
|
||||
build:
|
||||
context: .
|
||||
dockerfile: src/Web/WebStatus/Dockerfile
|
||||
|
||||
payment.api:
|
||||
image: eshop/payment.api-win:${TAG:-latest}
|
||||
build:
|
||||
context: .
|
||||
dockerfile: src/Services/Payment/Payment.API/Dockerfile
|
||||
depends_on:
|
||||
- rabbitmq
|
||||
|
||||
locations.api:
|
||||
image: eshop/locations.api-win:${TAG:-latest}
|
||||
build:
|
||||
context: .
|
||||
dockerfile: src/Services/Location/Locations.API/Dockerfile
|
||||
depends_on:
|
||||
- nosql.data
|
||||
- rabbitmq
|
||||
|
||||
sql.data:
|
||||
image: microsoft/mssql-server-windows-developer
|
||||
|
||||
nosql.data:
|
||||
image: mongo:windowsservercore
|
||||
|
||||
basket.data:
|
||||
image: redis:nanoserver
|
||||
ports:
|
||||
- "6379:6379"
|
||||
|
||||
rabbitmq:
|
||||
image: spring2/rabbitmq
|
||||
ports:
|
||||
- "15672:15672"
|
||||
- "5672:5672"
|
||||
|
||||
networks:
|
||||
default:
|
||||
external:
|
||||
name: nat
|
||||
|
@ -37,11 +37,6 @@ services:
|
||||
- EventBusUserName=admin
|
||||
- EventBusPassword=password
|
||||
|
||||
ordering.api:
|
||||
environment:
|
||||
- EventBusUserName=admin
|
||||
- EventBusPassword=password
|
||||
|
||||
ordering.backgroundtasks:
|
||||
environment:
|
||||
- EventBusUserName=admin
|
||||
@ -58,6 +53,6 @@ services:
|
||||
- EventBusPassword=password
|
||||
|
||||
ordering.signalrhub:
|
||||
environment:
|
||||
environment:
|
||||
- EventBusUserName=admin
|
||||
- EventBusPassword=password
|
||||
- EventBusPassword=password
|
||||
|
@ -252,8 +252,7 @@ services:
|
||||
ports:
|
||||
- "5200:80"
|
||||
volumes:
|
||||
- ./src/ApiGateways/Mobile.Bff.Shopping/apigw:/app/configuration
|
||||
|
||||
- ./src/ApiGateways/Mobile.Bff.Shopping/apigw:${ESHOP_OCELOT_VOLUME_SPEC:-/app/configuration}
|
||||
mobilemarketingapigw:
|
||||
environment:
|
||||
- ASPNETCORE_ENVIRONMENT=Development
|
||||
@ -261,7 +260,7 @@ services:
|
||||
ports:
|
||||
- "5201:80"
|
||||
volumes:
|
||||
- ./src/ApiGateways/Mobile.Bff.Marketing/apigw:/app/configuration
|
||||
- ./src/ApiGateways/Mobile.Bff.Marketing/apigw:${ESHOP_OCELOT_VOLUME_SPEC:-/app/configuration}
|
||||
|
||||
webshoppingapigw:
|
||||
environment:
|
||||
@ -270,7 +269,7 @@ services:
|
||||
ports:
|
||||
- "5202:80"
|
||||
volumes:
|
||||
- ./src/ApiGateways/Web.Bff.Shopping/apigw:/app/configuration
|
||||
- ./src/ApiGateways/Web.Bff.Shopping/apigw:${ESHOP_OCELOT_VOLUME_SPEC:-/app/configuration}
|
||||
|
||||
webmarketingapigw:
|
||||
environment:
|
||||
@ -279,7 +278,7 @@ services:
|
||||
ports:
|
||||
- "5203:80"
|
||||
volumes:
|
||||
- ./src/ApiGateways/Web.Bff.Marketing/apigw:/app/configuration
|
||||
- ./src/ApiGateways/Web.Bff.Marketing/apigw:${ESHOP_OCELOT_VOLUME_SPEC:-/app/configuration}
|
||||
|
||||
mobileshoppingagg:
|
||||
environment:
|
||||
|
39
docker-compose.windows.yml
Normal file
39
docker-compose.windows.yml
Normal file
@ -0,0 +1,39 @@
|
||||
# This file contains specific services build and images for Windows Containers.
|
||||
#
|
||||
# MUST be used alongside "docker-compose.yml" in all windows container commands
|
||||
|
||||
version: '3.4'
|
||||
|
||||
services:
|
||||
identity.api:
|
||||
build:
|
||||
args:
|
||||
NODE_IMAGE: stefanscherer/node-windows:8.11
|
||||
|
||||
webmvc:
|
||||
build:
|
||||
args:
|
||||
NODE_IMAGE: stefanscherer/node-windows:8.11
|
||||
|
||||
webspa:
|
||||
build:
|
||||
args:
|
||||
NODE_IMAGE: stefanscherer/node-windows:8.11
|
||||
|
||||
sql.data:
|
||||
image: microsoft/mssql-server-windows-developer
|
||||
|
||||
nosql.data:
|
||||
image: mongo:windowsservercore
|
||||
|
||||
basket.data:
|
||||
image: redis:nanoserver
|
||||
|
||||
rabbitmq:
|
||||
image: spring2/rabbitmq
|
||||
|
||||
|
||||
networks:
|
||||
default:
|
||||
external:
|
||||
name: nat
|
@ -202,10 +202,10 @@ services:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: src/Web/WebSPA/Dockerfile
|
||||
depends_on:
|
||||
- webshoppingagg
|
||||
- webshoppingapigw
|
||||
- webmarketingapigw
|
||||
# depends_on:
|
||||
# - webshoppingagg
|
||||
# - webshoppingapigw
|
||||
# - webmarketingapigw
|
||||
|
||||
|
||||
webmvc:
|
||||
|
8
docker-scripts/linux/install-node.sh
Normal file
8
docker-scripts/linux/install-node.sh
Normal file
@ -0,0 +1,8 @@
|
||||
#!/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
|
4
docker-scripts/win/install-node.cmd
Normal file
4
docker-scripts/win/install-node.cmd
Normal file
@ -0,0 +1,4 @@
|
||||
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"
|
@ -1,22 +1,20 @@
|
||||
ARG NODE_IMAGE=node:8.11
|
||||
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM microsoft/dotnet:2.1-sdk AS sdk-with-node
|
||||
ENV NODE_VERSION 8.11.1
|
||||
ENV NODE_DOWNLOAD_SHA 0e20787e2eda4cc31336d8327556ebc7417e8ee0a6ba0de96a09b0ec2b841f60
|
||||
RUN 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
|
||||
FROM microsoft/dotnet:2.1-sdk as dotnet-build
|
||||
WORKDIR /src
|
||||
|
||||
FROM sdk-with-node AS updated-npm
|
||||
RUN npm i -g npm
|
||||
|
||||
|
||||
FROM updated-npm as build
|
||||
FROM ${NODE_IMAGE} as node-build
|
||||
WORKDIR /web
|
||||
COPY src/Services/Identity/Identity.API .
|
||||
RUN npm install -g bower@1.8.4
|
||||
RUN bower install --allow-root
|
||||
|
||||
FROM dotnet-build as build
|
||||
WORKDIR /src/src/Services/Identity/Identity.API/wwwroot
|
||||
COPY --from=node-build /web/wwwroot .
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
WORKDIR /src/src/Services/Identity/Identity.API
|
||||
|
@ -27,7 +27,6 @@
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
|
||||
<Exec Command="bower install --allow-root" />
|
||||
<Exec Command="dotnet bundle" Condition="'$(ASPNETCORE_ENVIRONMENT)'!='Development'" />
|
||||
</Target>
|
||||
|
||||
|
@ -1,26 +1,24 @@
|
||||
ARG NODE_IMAGE=node:8.11
|
||||
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM microsoft/dotnet:2.1-sdk AS sdk-with-node
|
||||
ENV NODE_VERSION 8.11.1
|
||||
ENV NODE_DOWNLOAD_SHA 0e20787e2eda4cc31336d8327556ebc7417e8ee0a6ba0de96a09b0ec2b841f60
|
||||
RUN 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
|
||||
FROM microsoft/dotnet:2.1-sdk as dotnet-build
|
||||
WORKDIR /src
|
||||
|
||||
FROM sdk-with-node AS updated-npm
|
||||
RUN npm i -g npm
|
||||
|
||||
FROM updated-npm as build
|
||||
FROM ${NODE_IMAGE} as node-build
|
||||
WORKDIR /web
|
||||
COPY src/Web/WebMVC .
|
||||
RUN npm install -g bower@1.8.4
|
||||
RUN bower install --allow-root
|
||||
|
||||
FROM dotnet-build as build
|
||||
WORKDIR /src/src/Web/WebMVC/wwwroot
|
||||
COPY --from=node-build /web/wwwroot .
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
WORKDIR /src/src/Web/WebMVC
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
RUN dotnet build --no-restore -c Release -o /app
|
||||
|
||||
FROM build AS publish
|
||||
RUN dotnet publish --no-restore -c Release -o /app
|
||||
|
@ -31,7 +31,6 @@
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
|
||||
<Exec Command="bower install --allow-root" />
|
||||
<Exec Command="dotnet bundle" Condition="'$(ASPNETCORE_ENVIRONMENT)'!='Development'" />
|
||||
</Target>
|
||||
|
||||
|
@ -1,28 +1,24 @@
|
||||
ARG NODE_IMAGE=node:8.11
|
||||
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM microsoft/dotnet:2.1-sdk AS sdk-with-node
|
||||
ENV NODE_VERSION 8.11.1
|
||||
ENV NODE_DOWNLOAD_SHA 0e20787e2eda4cc31336d8327556ebc7417e8ee0a6ba0de96a09b0ec2b841f60
|
||||
RUN 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
|
||||
FROM microsoft/dotnet:2.1-sdk as dotnet-build
|
||||
WORKDIR /src
|
||||
|
||||
FROM sdk-with-node AS updated-npm
|
||||
RUN npm i -g npm
|
||||
FROM ${NODE_IMAGE} as node-build
|
||||
WORKDIR /web
|
||||
COPY src/Web/WebSPA .
|
||||
RUN npm install
|
||||
RUN npm run build:prod
|
||||
|
||||
FROM updated-npm as build
|
||||
FROM dotnet-build as publish
|
||||
WORKDIR /src/src/Web/WebSPA/wwwroot
|
||||
COPY --from=node-build /web/wwwroot .
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
WORKDIR /src/src/Web/WebSPA
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
RUN dotnet build --no-restore -c Release -o /app
|
||||
|
||||
FROM build AS publish
|
||||
RUN dotnet publish --no-restore -c Release -o /app
|
||||
RUN dotnet publish -c Release -o /app
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
|
@ -94,16 +94,6 @@
|
||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- workaround for https://github.com/aspnet/websdk/issues/114 -->
|
||||
<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
|
||||
<Exec Command="npm install" />
|
||||
<Exec Command="npm run build:prod" />
|
||||
<ItemGroup>
|
||||
<_GeneratedFiles Include="$(GeneratedItemPatterns)" />
|
||||
<ContentWithTargetPath Include="@(_GeneratedFiles)" TargetPath="%(Identity)" CopyToPublishDirectory="PreserveNewest" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
|
||||
<!-- workaround for https://github.com/aspnet/websdk/issues/114 -->
|
||||
<!--
|
||||
|
Loading…
x
Reference in New Issue
Block a user