diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 00000000..3729ff0c
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,25 @@
+**/.classpath
+**/.dockerignore
+**/.env
+**/.git
+**/.gitignore
+**/.project
+**/.settings
+**/.toolstarget
+**/.vs
+**/.vscode
+**/*.*proj.user
+**/*.dbmdl
+**/*.jfm
+**/azds.yaml
+**/bin
+**/charts
+**/docker-compose*
+**/Dockerfile*
+**/node_modules
+**/npm-debug.log
+**/obj
+**/secrets.dev.yaml
+**/values.dev.yaml
+LICENSE
+README.md
\ No newline at end of file
diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/master-ci.yml
similarity index 97%
rename from .github/workflows/dotnet-core.yml
rename to .github/workflows/master-ci.yml
index e7fab1b0..70ec7a5f 100644
--- a/.github/workflows/dotnet-core.yml
+++ b/.github/workflows/master-ci.yml
@@ -41,7 +41,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
- dotnet-version: 3.1.301
+ dotnet-version: 6.0.100
- name: Install dependencies
run: dotnet restore
- name: Build
diff --git a/.github/workflows/publish-dotnet.yml b/.github/workflows/publish.yml
similarity index 97%
rename from .github/workflows/publish-dotnet.yml
rename to .github/workflows/publish.yml
index 156a4240..a994f470 100644
--- a/.github/workflows/publish-dotnet.yml
+++ b/.github/workflows/publish.yml
@@ -39,7 +39,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
- dotnet-version: 3.1.301
+ dotnet-version: 6.0.100
- name: Install dependencies
run: dotnet restore
- name: Build
diff --git a/.github/workflows/dotnet.yml b/.github/workflows/release-xxx.yml
similarity index 70%
rename from .github/workflows/dotnet.yml
rename to .github/workflows/release-xxx.yml
index 2e2b8d51..4626ead4 100644
--- a/.github/workflows/dotnet.yml
+++ b/.github/workflows/release-xxx.yml
@@ -1,4 +1,4 @@
-name: release-xxx ci workflow
+name: v-xxx ci workflow , it will build dockerimage-v.xxx and create a release package
on:
push:
@@ -6,7 +6,7 @@ on:
- '**/*.md'
- '**/*.yml'
tags:
- - 'release-*'
+ - 'v-*'
jobs:
build-reactapp:
@@ -40,7 +40,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
- dotnet-version: 3.1.301
+ dotnet-version: 6.0.100
- name: Install dependencies
run: dotnet restore
- name: Build
@@ -49,6 +49,17 @@ jobs:
with:
name: agileconfig-ui
path: AgileConfig.Server.Apisite/wwwroot/ui
+ - name: build server release xxx
+ run: dotnet publish AgileConfig.Server.Apisite/AgileConfig.Server.Apisite.csproj -c Release
+ - uses: papeloto/action-zip@v1
+ with:
+ files: AgileConfig.Server.Apisite/bin/Release/net6.0/publish/
+ dest: agileconfig_server_deploy.zip
+ - name: create release
+ uses: ncipollo/release-action@v1
+ with:
+ artifacts: agileconfig_server_deploy.zip
+ token: ${{ secrets.GITHUB_TOKEN }}
- name: Push to Docker hub release -xxx
uses: docker/build-push-action@v1
with:
diff --git a/Agile.Config.Protocol/Agile.Config.Protocol.csproj b/Agile.Config.Protocol/Agile.Config.Protocol.csproj
index 9f5c4f4a..dbc15171 100644
--- a/Agile.Config.Protocol/Agile.Config.Protocol.csproj
+++ b/Agile.Config.Protocol/Agile.Config.Protocol.csproj
@@ -1,7 +1,7 @@
- netstandard2.0
+ net6.0
diff --git a/AgileConfig.Server.Apisite/AgileConfig.Server.Apisite.csproj b/AgileConfig.Server.Apisite/AgileConfig.Server.Apisite.csproj
index 807c86ab..71810f54 100644
--- a/AgileConfig.Server.Apisite/AgileConfig.Server.Apisite.csproj
+++ b/AgileConfig.Server.Apisite/AgileConfig.Server.Apisite.csproj
@@ -1,10 +1,12 @@
- netcoreapp3.1
+ net6.0
InProcess
- 1.5.1.5
- 1.5.1.5
+ 1.5.3
+ 1.5.2
+ 1.5.2
+ Linux
@@ -22,12 +24,13 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/AgileConfig.Server.Apisite/JWT.cs b/AgileConfig.Server.Apisite/JWT.cs
index c18e1ecf..6b0a93e4 100644
--- a/AgileConfig.Server.Apisite/JWT.cs
+++ b/AgileConfig.Server.Apisite/JWT.cs
@@ -43,7 +43,7 @@ public static string GetToken(string userId, string userName, bool isAdmin)
{
new Claim(JwtRegisteredClaimNames.Jti, Guid.NewGuid().ToString()),
new Claim("id", userId, ClaimValueTypes.String), // 用户id
- new Claim("name", userName), // 用户名
+ new Claim("username", userName, ClaimValueTypes.String), // 用户名
new Claim("admin", isAdmin.ToString() ,ClaimValueTypes.Boolean) // 是否是管理员
};
var key = Encoding.UTF8.GetBytes(JwtSetting.Instance.SecurityKey);
diff --git a/AgileConfig.Server.Apisite/Properties/launchSettings.json b/AgileConfig.Server.Apisite/Properties/launchSettings.json
index dbfef018..386c4fe1 100644
--- a/AgileConfig.Server.Apisite/Properties/launchSettings.json
+++ b/AgileConfig.Server.Apisite/Properties/launchSettings.json
@@ -1,8 +1,8 @@
-{
+{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
- "windowsAuthentication": false,
- "anonymousAuthentication": true,
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:54550",
"sslPort": 0
@@ -21,10 +21,16 @@
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "home/index",
- "applicationUrl": "http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
- }
+ },
+ "applicationUrl": "http://localhost:5000"
+ },
+ "Docker": {
+ "commandName": "Docker",
+ "launchBrowser": true,
+ "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/api/values",
+ "publishAllPorts": true
}
}
}
\ No newline at end of file
diff --git a/AgileConfig.Server.Apisite/Startup.cs b/AgileConfig.Server.Apisite/Startup.cs
index 2b078ac2..170174c2 100644
--- a/AgileConfig.Server.Apisite/Startup.cs
+++ b/AgileConfig.Server.Apisite/Startup.cs
@@ -5,13 +5,10 @@
using AgileConfig.Server.Apisite.Websocket;
using AgileConfig.Server.Common;
using AgileConfig.Server.Data.Freesql;
-using AgileConfig.Server.IService;
using AgileConfig.Server.Service;
-using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
-using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
@@ -49,7 +46,7 @@ public void ConfigureServices(IServiceCollection services)
};
});
services.AddCors();
- services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_3_0).AddRazorRuntimeCompilation();
+ services.AddMvc().AddRazorRuntimeCompilation();
if (Appsettings.IsPreviewMode)
{
@@ -88,7 +85,6 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IService
app.UseWebSockets(new WebSocketOptions()
{
KeepAliveInterval = TimeSpan.FromSeconds(60),
- ReceiveBufferSize = 2 * 1024
});
app.UseMiddleware();
app.UseStaticFiles();
diff --git a/AgileConfig.Server.Common/AgileConfig.Server.Common.csproj b/AgileConfig.Server.Common/AgileConfig.Server.Common.csproj
index 7c8e0317..fac82794 100644
--- a/AgileConfig.Server.Common/AgileConfig.Server.Common.csproj
+++ b/AgileConfig.Server.Common/AgileConfig.Server.Common.csproj
@@ -1,13 +1,13 @@
- netcoreapp3.1
+ net6.0
-
-
+
+
diff --git a/AgileConfig.Server.Common/FunctionUtil.cs b/AgileConfig.Server.Common/FunctionUtil.cs
index 4807e386..0e6510a8 100644
--- a/AgileConfig.Server.Common/FunctionUtil.cs
+++ b/AgileConfig.Server.Common/FunctionUtil.cs
@@ -29,11 +29,11 @@ public static T TRY(Func func, int tryCount)
result = func();
break;
}
- catch (Exception ex)
+ catch
{
if (i == (tryCount - 1))
{
- throw ex;
+ throw;
}
}
}
@@ -63,11 +63,11 @@ public static async Task TRYAsync(Func> func, int tryCount)
result = await func();
break;
}
- catch (Exception ex)
+ catch
{
if (i == (tryCount - 1))
{
- throw ex;
+ throw;
}
}
}
@@ -126,11 +126,11 @@ public static void TRY(Action act, int tryCount)
act();
break;
}
- catch (Exception ex)
+ catch
{
if (i == (tryCount - 1))
{
- throw ex;
+ throw;
}
}
}
diff --git a/AgileConfig.Server.Common/HttpExt.cs b/AgileConfig.Server.Common/HttpExt.cs
index 1501b182..b836377f 100644
--- a/AgileConfig.Server.Common/HttpExt.cs
+++ b/AgileConfig.Server.Common/HttpExt.cs
@@ -61,7 +61,7 @@ public static (string, string) GetUserNamePasswordFromBasicAuthorization(this Ht
public static string GetUserNameFromClaim(this HttpContext httpContext)
{
- var name = httpContext.User?.FindFirst("name")?.Value;
+ var name = httpContext.User?.FindFirst("username")?.Value;
return name;
}
diff --git a/AgileConfig.Server.CommonTests/AgileConfig.Server.CommonTests.csproj b/AgileConfig.Server.CommonTests/AgileConfig.Server.CommonTests.csproj
index ac36e8a9..0b4c13d4 100644
--- a/AgileConfig.Server.CommonTests/AgileConfig.Server.CommonTests.csproj
+++ b/AgileConfig.Server.CommonTests/AgileConfig.Server.CommonTests.csproj
@@ -1,16 +1,19 @@
- netcoreapp3.1
+ net6.0
false
-
-
-
-
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/AgileConfig.Server.Data.Entity/AgileConfig.Server.Data.Entity.csproj b/AgileConfig.Server.Data.Entity/AgileConfig.Server.Data.Entity.csproj
index cd0c6879..114a83d7 100644
--- a/AgileConfig.Server.Data.Entity/AgileConfig.Server.Data.Entity.csproj
+++ b/AgileConfig.Server.Data.Entity/AgileConfig.Server.Data.Entity.csproj
@@ -1,12 +1,12 @@
- netcoreapp3.1
+ net6.0
-
+
diff --git a/AgileConfig.Server.Data.Freesql/AgileConfig.Server.Data.Freesql.csproj b/AgileConfig.Server.Data.Freesql/AgileConfig.Server.Data.Freesql.csproj
index f43fdbbd..47d6833b 100644
--- a/AgileConfig.Server.Data.Freesql/AgileConfig.Server.Data.Freesql.csproj
+++ b/AgileConfig.Server.Data.Freesql/AgileConfig.Server.Data.Freesql.csproj
@@ -1,7 +1,7 @@
- netcoreapp3.1
+ net6.0
diff --git a/AgileConfig.Server.IService/AgileConfig.Server.IService.csproj b/AgileConfig.Server.IService/AgileConfig.Server.IService.csproj
index d229a442..6485ad29 100644
--- a/AgileConfig.Server.IService/AgileConfig.Server.IService.csproj
+++ b/AgileConfig.Server.IService/AgileConfig.Server.IService.csproj
@@ -1,7 +1,7 @@
- netcoreapp3.1
+ net6.0
diff --git a/AgileConfig.Server.Service/AgileConfig.Server.Service.csproj b/AgileConfig.Server.Service/AgileConfig.Server.Service.csproj
index 7c328728..cd7d6a1c 100644
--- a/AgileConfig.Server.Service/AgileConfig.Server.Service.csproj
+++ b/AgileConfig.Server.Service/AgileConfig.Server.Service.csproj
@@ -1,7 +1,7 @@
- netcoreapp3.1
+ net6.0
diff --git a/AgileConfig.Server.ServiceTests/AgileConfig.Server.ServiceTests.csproj b/AgileConfig.Server.ServiceTests/AgileConfig.Server.ServiceTests.csproj
index 83bc87bc..4e915e98 100644
--- a/AgileConfig.Server.ServiceTests/AgileConfig.Server.ServiceTests.csproj
+++ b/AgileConfig.Server.ServiceTests/AgileConfig.Server.ServiceTests.csproj
@@ -1,17 +1,20 @@
- netcoreapp3.1
+ net6.0
false
-
-
-
-
-
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/AgileConfig.Server.UI/react-ui-antd/src/layouts/compos/LayoutFooter.tsx b/AgileConfig.Server.UI/react-ui-antd/src/layouts/compos/LayoutFooter.tsx
index 05489735..6ef401c8 100644
--- a/AgileConfig.Server.UI/react-ui-antd/src/layouts/compos/LayoutFooter.tsx
+++ b/AgileConfig.Server.UI/react-ui-antd/src/layouts/compos/LayoutFooter.tsx
@@ -14,7 +14,7 @@ const LayoutFooter : React.FC =()=>{
{ getAppVer()}
- Powered by .netcore3.1 ant-design-pro4
+ Powered by .netcore6.0 ant-design-pro4
)
}
diff --git a/ApiSiteTests/ApiSiteTests.csproj b/ApiSiteTests/ApiSiteTests.csproj
index 019ccfa1..e14b28b4 100644
--- a/ApiSiteTests/ApiSiteTests.csproj
+++ b/ApiSiteTests/ApiSiteTests.csproj
@@ -1,17 +1,20 @@
- netcoreapp3.1
+ net6.0
false
-
-
-
-
-
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4554279f..affcee6a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,8 @@
# Change log
------------------------------
+[1.5.2] - 2021.11.08
+* 支持环境间复制配置
+
[1.5.1.3] - 2021.11.03
* 应用列表支持排序
diff --git a/Dockerfile b/Dockerfile
index f72894c1..e9a32290 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,8 +1,8 @@
-FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base
+FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app
EXPOSE 5000
-FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
+FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["AgileConfig.Server.Apisite/AgileConfig.Server.Apisite.csproj", "AgileConfig.Server.Apisite/"]
COPY ["AgileConfig.Server.Data.Entity/AgileConfig.Server.Data.Entity.csproj", "AgileConfig.Server.Data.Entity/"]
diff --git a/README.md b/README.md
index 2de6fb36..c4d24b63 100644
--- a/README.md
+++ b/README.md
@@ -92,7 +92,7 @@ sudo docker run \
2. db:provider 配置程序的数据库类型。目前程序支持:sqlserver,mysql,sqlite, PostgreSql,Oracle 五种数据库。
3. db:conn 配置数据库连接串
-> 注意:如果通过IIS部署,请自行下载publish分支源码进行编译。请先编译react-ui-antd项目把dist内的产物复制到apisite项目的wwwroot/ui目录下。
+> 注意:如果通过IIS或者别的方式部署,请自行从主页上的[releases](https://github.com/dotnetcore/AgileConfig/releases)页面下载最新的部署包。如果自己使用源码编译,请先编译react-ui-antd项目把dist内的产物复制到apisite项目的wwwroot/ui目录下。
### 初始化管理员密码
第一次运行程序需要初始化超级管理员密码,超管用户名固定为 admin
![](https://ftp.bmp.ovh/imgs/2021/04/44242b327230c5e6.png)
@@ -146,7 +146,7 @@ Install-Package AgileConfig.Client
"nodes": "http://localhost:5000,http://localhost:5001"//多个节点使用逗号分隔,
"name": "client_name",
"tag": "tag1",
- "env": "dev"
+ "env": "DEV"
}
}
diff --git a/dsd b/dsd
new file mode 100644
index 00000000..8df18922
--- /dev/null
+++ b/dsd
@@ -0,0 +1,66 @@
+0.0.1
+1.0.0
+1.0.1
+1.0.2
+1.0.3
+1.0.4
+1.0.5
+1.0.6
+1.0.7
+1.0.8
+1.1.0
+1.1.1
+1.1.2
+1.1.3
+1.1.4
+1.1.5
+1.1.6
+1.1.7
+1.1.7.1
+1.1.7.2
+p1.2.0
+preview-1.2.0
+preview-1.2.0.1
+preview-1.2.0.2
+preview-1.2.0.3
+preview-1.3.0
+preview-1.3.1
+realease-1.3.8.1
+release-1.1.9
+release-1.2.0.3
+release-1.2.0.4
+release-1.2.1
+release-1.2.1.1
+release-1.2.1.2
+release-1.2.3
+release-1.2.3.1
+release-1.2.3.2
+release-1.2.3.3
+release-1.2.4
+release-1.3.1
+release-1.3.2
+release-1.3.3
+release-1.3.4
+release-1.3.5
+release-1.3.6
+release-1.3.7
+release-1.3.8
+release-1.3.8.2
+release-1.3.8.3
+release-1.3.8.4
+release-1.4.0
+release-1.4.1
+release-1.4.2
+release-1.4.3
+release-1.5.0
+release-1.5.1
+release-1.5.1.1
+release-1.5.1.2
+release-1.5.1.3
+release-1.5.1.4
+release-1.5.1.5
+release-1.5.2
+release-1.8.3.4
+v-1.5.2
+v1.5.2
+v1.5.3