Skip to content

Commit 780b850

Browse files
Fix to not change the default port 80. Adding overwriting default docker files.
1 parent 3b96923 commit 780b850

File tree

7 files changed

+29
-55
lines changed

7 files changed

+29
-55
lines changed

angular/Dockerfile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# stage 1
2+
FROM node:14 as node
3+
WORKDIR /app
4+
COPY . .
5+
RUN yarn install
6+
RUN yarn run ng build --configuration production
7+
# stage 2
18
FROM nginx
2-
3-
COPY . /usr/share/nginx/html
9+
COPY --from=node /app/dist /usr/share/nginx/html
10+
COPY fast-nginx-default.conf /etc/nginx/conf.d/default.conf

angular/Dockerfile-updated

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

aspnet-core/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ WORKDIR "/src/src/AbpCompanyName.AbpProjectName.Web.Host"
1919
RUN dotnet publish -c Release -o /publish --no-restore
2020

2121
FROM mcr.microsoft.com/dotnet/aspnet:5.0
22-
EXPOSE 44311
22+
EXPOSE 80
2323
WORKDIR /app
2424
COPY --from=build /publish .
2525
ENTRYPOINT ["dotnet", "AbpCompanyName.AbpProjectName.Web.Host.dll"]

aspnet-core/build/build-with-ng-updated.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ sudo echo ""
2222
cd ..
2323
cd angular/
2424
sudo echo " Building docker image $ABP_NG..."
25-
sudo docker build -t $ABP_NG -f Dockerfile-updated .
25+
sudo docker build -t $ABP_NG -f Dockerfile .
2626
sudo echo " Done. -- Building docker image $ABP_NG..."
2727
sudo echo ""
2828
sudo echo ""

aspnet-core/docker/ng/docker-compose-updated.yml

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

aspnet-core/docker/ng/docker-compose.yml

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
1-
version: '2'
1+
version: '3'
22

33
services:
44

5-
abp_host:
6-
image: abp/host
7-
environment:
8-
- ASPNETCORE_ENVIRONMENT=Staging
9-
ports:
10-
- "9901:80"
11-
volumes:
12-
- "./Host-Logs:/app/App_Data/Logs"
5+
abp_host:
6+
image: abp/host
7+
environment:
8+
ASPNETCORE_ENVIRONMENT: "Staging"
9+
ConnectionStrings__Default: "Server=10.0.75.1; Database=AbpProjectNameDb; User=AbpProjectNameUser; Password=YourStrongPassword;"
10+
App__CorsOrigins: "http://localhost:4200"
11+
TZ: "America/Toronto"
12+
ports:
13+
- "9902:44311"
14+
volumes:
15+
- "./Host-Logs:/app/App_Data/Logs"
16+
restart: always
17+
18+
abp_ng:
19+
image: abp/ng
20+
ports:
21+
- "4200:80"
1322

14-
abp_ng:
15-
image: abp/ng
16-
ports:
17-
- "9902:80"

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/Dockerfile

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

0 commit comments

Comments
 (0)