Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Commit fcff8e4

Browse files
committed
Fixes #630
1 parent de68b4c commit fcff8e4

File tree

14 files changed

+97
-210
lines changed

14 files changed

+97
-210
lines changed

cli-windows/start-windows-containers.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ $env:ESHOP_AZURE_STORAGE_CATALOG_URL ="http://10.0.75.1:5101/api/v1/catalog/item
2525
$env:ESHOP_AZURE_STORAGE_MARKETING_URL ="http://10.0.75.1:5110/api/v1/campaigns/[0]/pic/"
2626

2727
if (-Not $customEventBusLoginPassword) {
28-
docker-compose -f "$rootPath\docker-compose-windows.yml" -f "$rootPath\docker-compose.override.yml" -f "$rootPath\docker-compose.override.windows.yml" up
28+
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
2929
}
3030
else {
31-
docker-compose -f "$rootPath\docker-compose-windows.yml" -f "$rootPath\docker-compose.override.yml" up
31+
docker-compose -f "$rootPath\docker-compose.yml" -f "$rootPath\docker-compose.override.yml" -f "$rootPath\docker-compose.windows.yml" up
3232
}

docker-compose-windows.yml

Lines changed: 0 additions & 138 deletions
This file was deleted.

docker-compose.override.windows.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@ services:
3737
- EventBusUserName=admin
3838
- EventBusPassword=password
3939

40-
ordering.api:
41-
environment:
42-
- EventBusUserName=admin
43-
- EventBusPassword=password
44-
4540
ordering.backgroundtasks:
4641
environment:
4742
- EventBusUserName=admin
@@ -58,6 +53,6 @@ services:
5853
- EventBusPassword=password
5954

6055
ordering.signalrhub:
61-
environment:
56+
environment:
6257
- EventBusUserName=admin
63-
- EventBusPassword=password
58+
- EventBusPassword=password

docker-compose.override.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -252,16 +252,15 @@ services:
252252
ports:
253253
- "5200:80"
254254
volumes:
255-
- ./src/ApiGateways/Mobile.Bff.Shopping/apigw:/app/configuration
256-
255+
- ./src/ApiGateways/Mobile.Bff.Shopping/apigw:${ESHOP_OCELOT_VOLUME_SPEC:-/app/configuration}
257256
mobilemarketingapigw:
258257
environment:
259258
- ASPNETCORE_ENVIRONMENT=Development
260259
- IdentityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
261260
ports:
262261
- "5201:80"
263262
volumes:
264-
- ./src/ApiGateways/Mobile.Bff.Marketing/apigw:/app/configuration
263+
- ./src/ApiGateways/Mobile.Bff.Marketing/apigw:${ESHOP_OCELOT_VOLUME_SPEC:-/app/configuration}
265264

266265
webshoppingapigw:
267266
environment:
@@ -270,7 +269,7 @@ services:
270269
ports:
271270
- "5202:80"
272271
volumes:
273-
- ./src/ApiGateways/Web.Bff.Shopping/apigw:/app/configuration
272+
- ./src/ApiGateways/Web.Bff.Shopping/apigw:${ESHOP_OCELOT_VOLUME_SPEC:-/app/configuration}
274273

275274
webmarketingapigw:
276275
environment:
@@ -279,7 +278,7 @@ services:
279278
ports:
280279
- "5203:80"
281280
volumes:
282-
- ./src/ApiGateways/Web.Bff.Marketing/apigw:/app/configuration
281+
- ./src/ApiGateways/Web.Bff.Marketing/apigw:${ESHOP_OCELOT_VOLUME_SPEC:-/app/configuration}
283282

284283
mobileshoppingagg:
285284
environment:

docker-compose.windows.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This file contains specific services build and images for Windows Containers.
2+
#
3+
# MUST be used alongside "docker-compose.yml" in all windows container commands
4+
5+
version: '3.4'
6+
7+
services:
8+
identity.api:
9+
build:
10+
args:
11+
NODE_IMAGE: stefanscherer/node-windows:8.11
12+
13+
webmvc:
14+
build:
15+
args:
16+
NODE_IMAGE: stefanscherer/node-windows:8.11
17+
18+
webspa:
19+
build:
20+
args:
21+
NODE_IMAGE: stefanscherer/node-windows:8.11
22+
23+
sql.data:
24+
image: microsoft/mssql-server-windows-developer
25+
26+
nosql.data:
27+
image: mongo:windowsservercore
28+
29+
basket.data:
30+
image: redis:nanoserver
31+
32+
rabbitmq:
33+
image: spring2/rabbitmq
34+
35+
36+
networks:
37+
default:
38+
external:
39+
name: nat

docker-compose.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,10 @@ services:
202202
build:
203203
context: .
204204
dockerfile: src/Web/WebSPA/Dockerfile
205-
depends_on:
206-
- webshoppingagg
207-
- webshoppingapigw
208-
- webmarketingapigw
205+
# depends_on:
206+
# - webshoppingagg
207+
# - webshoppingapigw
208+
# - webmarketingapigw
209209

210210

211211
webmvc:
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
3+
export NODE_DOWNLOAD_SHA 0e20787e2eda4cc31336d8327556ebc7417e8ee0a6ba0de96a09b0ec2b841f60
4+
curl -SL "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.gz" --output nodejs.tar.gz \
5+
&& echo "$NODE_DOWNLOAD_SHA nodejs.tar.gz" | sha256sum -c - \
6+
&& tar -xzf "nodejs.tar.gz" -C /usr/local --strip-components=1 \
7+
&& rm nodejs.tar.gz \
8+
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
set NODE_VERSION=8.11.1
2+
curl -SL "https://nodejs.org/dist/v%NODE_VERSION%/node-v%NODE_VERSION%-win-x64.zip" --output nodejs.zip
3+
tar -xf nodejs.zip -C c:\
4+
setx PATH "%PATH%;c:\node-v%NODE_VERSION%-win-x64"

src/Services/Identity/Identity.API/Dockerfile

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
1+
ARG NODE_IMAGE=node:8.11
12
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
23
WORKDIR /app
34
EXPOSE 80
45

5-
FROM microsoft/dotnet:2.1-sdk AS sdk-with-node
6-
ENV NODE_VERSION 8.11.1
7-
ENV NODE_DOWNLOAD_SHA 0e20787e2eda4cc31336d8327556ebc7417e8ee0a6ba0de96a09b0ec2b841f60
8-
RUN curl -SL "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.gz" --output nodejs.tar.gz \
9-
&& echo "$NODE_DOWNLOAD_SHA nodejs.tar.gz" | sha256sum -c - \
10-
&& tar -xzf "nodejs.tar.gz" -C /usr/local --strip-components=1 \
11-
&& rm nodejs.tar.gz \
12-
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
13-
14-
FROM sdk-with-node AS updated-npm
15-
RUN npm i -g npm
16-
6+
FROM microsoft/dotnet:2.1-sdk as dotnet-build
7+
WORKDIR /src
178

18-
FROM updated-npm as build
9+
FROM ${NODE_IMAGE} as node-build
10+
WORKDIR /web
11+
COPY src/Services/Identity/Identity.API .
1912
RUN npm install -g [email protected]
13+
RUN bower install --allow-root
14+
15+
FROM dotnet-build as build
16+
WORKDIR /src/src/Services/Identity/Identity.API/wwwroot
17+
COPY --from=node-build /web/wwwroot .
2018
WORKDIR /src
2119
COPY . .
2220
WORKDIR /src/src/Services/Identity/Identity.API

src/Services/Identity/Identity.API/Identity.API.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
</ItemGroup>
2828

2929
<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
30-
<Exec Command="bower install --allow-root" />
3130
<Exec Command="dotnet bundle" Condition="'$(ASPNETCORE_ENVIRONMENT)'!='Development'" />
3231
</Target>
3332

0 commit comments

Comments
 (0)