From 7d1cae96964758bc8da60c92480b2a28840d48b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=86=9B?= <510423039@qq.com> Date: Sat, 4 Dec 2021 16:09:27 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=91=20=E6=97=A5=E5=B8=B8Bug=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/dotnet.yml | 52 ------------------- .github/workflows/vben2.7.yml | 26 ---------- .../appsettings.Consul.json | 48 +++++++++++++++++ .../AbpProIdentityServerModule.cs | 12 +---- .../Seeds/AbpSettingDataSeedContributor.cs | 2 +- 5 files changed, 51 insertions(+), 89 deletions(-) delete mode 100644 .github/workflows/dotnet.yml delete mode 100644 .github/workflows/vben2.7.yml create mode 100644 aspnet-core/gateways/Lion.AbpPro.WebGateway/appsettings.Consul.json diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml deleted file mode 100644 index 809c0d63..00000000 --- a/.github/workflows/dotnet.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Build-Dokcer -on: - push: - tags: - - "*" - -jobs: - Push-DockerHub: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Install Dotnet 6.x - uses: actions/setup-dotnet@v1 - with: - dotnet-version: "6.0" - include-prerelease: True - - name: 设置标签 - id: vars - run: echo ::set-output name=tag::${GITHUB_REF:10} - - - name: 编译 - run: dotnet build aspnet-core/Lion.AbpPro.sln - - - name: 发布HostApi - run: cd aspnet-core/services/host/Lion.AbpPro.HttpApi.Host && - dotnet publish -c release -o publish && - docker build -t abp-vnext-pro-api:${{ steps.vars.outputs.tag }} . - - - name: 发布IdentityServer4 - run: cd aspnet-core/services/host/Lion.AbpPro.IdentityServer && - dotnet publish -c release -o publish && - docker build -t abp-vnext-pro-id4:${{ steps.vars.outputs.tag }} . - - - name: 发布WebGateway - run: cd aspnet-core/gateways/Lion.AbpPro.WebGateway && - dotnet publish -c release -o publish && - docker build -t abp-vnext-pro-web-gateway:${{ steps.vars.outputs.tag }} . - - - name: 登录Docker - run: docker login -u zzzwangjun -p ${{secrets.dockerHubPassword}} - - - name: HostApi镜像推送到DockerHub - run: docker tag abp-vnext-pro-api:${{ steps.vars.outputs.tag }} zzzwangjun/abp-vnext-pro-api:${{ steps.vars.outputs.tag }} && - docker push zzzwangjun/abp-vnext-pro-api:${{ steps.vars.outputs.tag }} - - - name: IdentityServer4镜像推送到DockerHub - run: docker tag abp-vnext-pro-id4:${{ steps.vars.outputs.tag }} zzzwangjun/abp-vnext-pro-id4:${{ steps.vars.outputs.tag }} && - docker push zzzwangjun/abp-vnext-pro-id4:${{ steps.vars.outputs.tag }} - - - name: WebGateway镜像推送到DockerHub - run: docker tag abp-vnext-pro-web-gateway:${{ steps.vars.outputs.tag }} zzzwangjun/abp-vnext-pro-web-gateway:${{ steps.vars.outputs.tag }} && - docker push zzzwangjun/abp-vnext-pro-web-gateway:${{ steps.vars.outputs.tag }} diff --git a/.github/workflows/vben2.7.yml b/.github/workflows/vben2.7.yml deleted file mode 100644 index d5a86209..00000000 --- a/.github/workflows/vben2.7.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Vben2.7 -on: - push: - tags: - - "*" -jobs: - Push-DockerHub: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Use Node.js - uses: actions/setup-node@v1 - with: - node-version: 14.x - - name: Set Tag - id: vars - run: echo ::set-output name=tag::${GITHUB_REF:10} - - - name: Build And Push Docker Hub - run: cd vben271 && - npm install && - npm run build && - docker login -u zzzwangjun -p ${{secrets.dockerHubPassword}} && - docker build -t abp-vnext-pro-ui:${{ steps.vars.outputs.tag }} . && - docker tag abp-vnext-pro-ui:${{ steps.vars.outputs.tag }} zzzwangjun/abp-vnext-pro-ui:${{ steps.vars.outputs.tag }} && - docker push zzzwangjun/abp-vnext-pro-ui:${{ steps.vars.outputs.tag }} diff --git a/aspnet-core/gateways/Lion.AbpPro.WebGateway/appsettings.Consul.json b/aspnet-core/gateways/Lion.AbpPro.WebGateway/appsettings.Consul.json new file mode 100644 index 00000000..57991d1e --- /dev/null +++ b/aspnet-core/gateways/Lion.AbpPro.WebGateway/appsettings.Consul.json @@ -0,0 +1,48 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "AllowedHosts": "*", + "App": { + "SelfUrl": "http://120.24.194.14:8014", + "CorsOrigins": "http://localhost:4200,http://120.24.194.14:8012,http://120.24.194.14:8011,http://120.24.194.14:8013" + }, + "GlobalConfiguration": { + }, + "Routes": [ + { + "DownstreamPathTemplate": "/{url}", + "DownstreamScheme": "http", + "ServiceName": "AbpPro-Service", + "LoadBalancerOptions": { + "Type": "LeastConnection" + }, + "UpstreamPathTemplate": "/gateway/{url}", + "UpstreamHttpMethod": [ + "Get", + "Post", + "Put", + "Delete" + ] + }, + { + "DownstreamPathTemplate": "/{url}", + "DownstreamScheme": "ws", + "ServiceName": "AbpPro-Service", + "LoadBalancerOptions": { + "Type": "LeastConnection" + }, + "UpstreamPathTemplate": "/ws/{url}", + "UpstreamHttpMethod": [ + "Get", + "Post", + "Put", + "Delete" + ] + } + ] +} diff --git a/aspnet-core/services/host/Lion.AbpPro.IdentityServer/AbpProIdentityServerModule.cs b/aspnet-core/services/host/Lion.AbpPro.IdentityServer/AbpProIdentityServerModule.cs index a17b2b00..30c03cd8 100644 --- a/aspnet-core/services/host/Lion.AbpPro.IdentityServer/AbpProIdentityServerModule.cs +++ b/aspnet-core/services/host/Lion.AbpPro.IdentityServer/AbpProIdentityServerModule.cs @@ -95,21 +95,13 @@ namespace Lion.AbpPro } private void ConfigureOther(IConfiguration configuration) - { - Configure(options => - { - options.Applications["MVC"].RootUrl = configuration["App:SelfUrl"]; - options.RedirectAllowedUrls.AddRange(configuration["App:RedirectAllowedUrls"].Split(',')); - - options.Applications["Angular"].RootUrl = configuration["App:ClientUrl"]; - options.Applications["Angular"].Urls[AccountUrlNames.PasswordReset] = "account/reset-password"; - }); + Configure(options => { options.IsJobExecutionEnabled = false; }); Configure(options => { //options.IsEnabledForGetRequests = true; - options.ApplicationName = "AuthServer"; + options.ApplicationName = "IdentityServer"; }); } diff --git a/aspnet-core/services/src/Lion.AbpPro.Domain/Data/Seeds/AbpSettingDataSeedContributor.cs b/aspnet-core/services/src/Lion.AbpPro.Domain/Data/Seeds/AbpSettingDataSeedContributor.cs index 80c75acf..3e3f6558 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Domain/Data/Seeds/AbpSettingDataSeedContributor.cs +++ b/aspnet-core/services/src/Lion.AbpPro.Domain/Data/Seeds/AbpSettingDataSeedContributor.cs @@ -9,7 +9,7 @@ namespace Lion.AbpPro.Data.Seeds { private readonly ISettingManager _settingManager; private const string DefaultLanguageKey = "Abp.Localization.DefaultLanguage"; - private const string DefaultLanguage = "zh-hans"; + private const string DefaultLanguage = "zh-Hans"; public AbpSettingDataSeedContributor(ISettingManager settingManager) { _settingManager = settingManager;