Fix to not change the default port 80. Adding overwriting default docker files.

This commit is contained in:
EduardoSantanaSeverino 2021-09-13 15:52:34 -04:00
Родитель 3b9692301a
Коммит 780b850090
7 изменённых файлов: 29 добавлений и 55 удалений

Просмотреть файл

@ -1,3 +1,10 @@
# stage 1
FROM node:14 as node
WORKDIR /app
COPY . .
RUN yarn install
RUN yarn run ng build --configuration production
# stage 2
FROM nginx
COPY . /usr/share/nginx/html
COPY --from=node /app/dist /usr/share/nginx/html
COPY fast-nginx-default.conf /etc/nginx/conf.d/default.conf

Просмотреть файл

@ -1,10 +0,0 @@
# stage 1
FROM node:14 as node
WORKDIR /app
COPY . .
RUN yarn install
RUN yarn run ng build --configuration production
# stage 2
FROM nginx
COPY --from=node /app/dist /usr/share/nginx/html
COPY fast-nginx-default.conf /etc/nginx/conf.d/default.conf

Просмотреть файл

@ -19,7 +19,7 @@ WORKDIR "/src/src/AbpCompanyName.AbpProjectName.Web.Host"
RUN dotnet publish -c Release -o /publish --no-restore
FROM mcr.microsoft.com/dotnet/aspnet:5.0
EXPOSE 44311
EXPOSE 80
WORKDIR /app
COPY --from=build /publish .
ENTRYPOINT ["dotnet", "AbpCompanyName.AbpProjectName.Web.Host.dll"]

Просмотреть файл

@ -22,7 +22,7 @@ sudo echo ""
cd ..
cd angular/
sudo echo " Building docker image $ABP_NG..."
sudo docker build -t $ABP_NG -f Dockerfile-updated .
sudo docker build -t $ABP_NG -f Dockerfile .
sudo echo " Done. -- Building docker image $ABP_NG..."
sudo echo ""
sudo echo ""

Просмотреть файл

@ -1,22 +0,0 @@
version: '3'
services:
abp_host:
image: abp/host
environment:
ASPNETCORE_ENVIRONMENT: "Staging"
ConnectionStrings__Default: "Server=10.0.75.1; Database=AbpProjectNameDb; User=AbpProjectNameUser; Password=YourStrongPassword;"
App__CorsOrigins: "http://localhost:4200"
Kestrel__EndPoints__Http__Url: "http://*:44311"
TZ: "America/Toronto"
ports:
- "9902:44311"
volumes:
- "./Host-Logs:/app/App_Data/Logs"
restart: always
abp_ng:
image: abp/ng
ports:
- "4200:80"

Просмотреть файл

@ -1,17 +1,22 @@
version: '2'
version: '3'
services:
abp_host:
image: abp/host
environment:
- ASPNETCORE_ENVIRONMENT=Staging
ports:
- "9901:80"
volumes:
- "./Host-Logs:/app/App_Data/Logs"
abp_host:
image: abp/host
environment:
ASPNETCORE_ENVIRONMENT: "Staging"
ConnectionStrings__Default: "Server=10.0.75.1; Database=AbpProjectNameDb; User=AbpProjectNameUser; Password=YourStrongPassword;"
App__CorsOrigins: "http://localhost:4200"
TZ: "America/Toronto"
ports:
- "9902:44311"
volumes:
- "./Host-Logs:/app/App_Data/Logs"
restart: always
abp_ng:
image: abp/ng
ports:
- "4200:80"
abp_ng:
image: abp/ng
ports:
- "9902:80"

Просмотреть файл

@ -1,6 +0,0 @@
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2-stretch-slim
WORKDIR /app
COPY . .
ENTRYPOINT ["dotnet", "AbpCompanyName.AbpProjectName.Web.Mvc.dll"]