From cf5077a34cd1d3ac9682c9e1f18a26c37997dcc0 Mon Sep 17 00:00:00 2001 From: zpc Date: Wed, 23 Jul 2025 01:08:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9docker=E6=89=93=E5=8C=85?= =?UTF-8?q?=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/CoreCms.Net.Web.Admin/Dockerfile | 2 +- src/CoreCms.Net.Web.Admin/appsettings.json | 8 ++++++++ src/CoreCms.Net.Web.WebApi/Dockerfile | 2 +- src/CoreCms.Net.Web.WebApi/appsettings.json | 8 ++++++++ 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/CoreCms.Net.Web.Admin/Dockerfile b/src/CoreCms.Net.Web.Admin/Dockerfile index fa479e6..ccd5a3e 100644 --- a/src/CoreCms.Net.Web.Admin/Dockerfile +++ b/src/CoreCms.Net.Web.Admin/Dockerfile @@ -4,7 +4,7 @@ FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base USER $APP_UID WORKDIR /app -EXPOSE 8080 +EXPOSE 80 # 此阶段用于生成服务项目 diff --git a/src/CoreCms.Net.Web.Admin/appsettings.json b/src/CoreCms.Net.Web.Admin/appsettings.json index daf30a3..bfdc1ea 100644 --- a/src/CoreCms.Net.Web.Admin/appsettings.json +++ b/src/CoreCms.Net.Web.Admin/appsettings.json @@ -167,5 +167,13 @@ "WxOpenAppSecret": "", "WxOpenToken": "", "WxOpenEncodingAESKey": "" + }, + //服务器配置 + "Kestrel": { + "Endpoints": { + "Http": { + "Url": "http://*:80" + } + } } } \ No newline at end of file diff --git a/src/CoreCms.Net.Web.WebApi/Dockerfile b/src/CoreCms.Net.Web.WebApi/Dockerfile index ec272ff..01a05d8 100644 --- a/src/CoreCms.Net.Web.WebApi/Dockerfile +++ b/src/CoreCms.Net.Web.WebApi/Dockerfile @@ -4,7 +4,7 @@ FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base USER $APP_UID WORKDIR /app -EXPOSE 8080 +EXPOSE 80 # 此阶段用于生成服务项目 diff --git a/src/CoreCms.Net.Web.WebApi/appsettings.json b/src/CoreCms.Net.Web.WebApi/appsettings.json index c284131..ea3c6f7 100644 --- a/src/CoreCms.Net.Web.WebApi/appsettings.json +++ b/src/CoreCms.Net.Web.WebApi/appsettings.json @@ -173,5 +173,13 @@ "WxOpenAppSecret": "f042145475d722eadcac3ccd9abc538e", "WxOpenToken": "", "WxOpenEncodingAESKey": "" + }, + //服务器配置 + "Kestrel": { + "Endpoints": { + "Http": { + "Url": "http://*:80" + } + } } } \ No newline at end of file