Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/arm32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
- uses: actions/checkout@v4
- name: setup .net
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.*
dotnet-version: |
8.0.x
9.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
- uses: actions/checkout@v4
- name: setup .net
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.*
dotnet-version: |
8.0.x
9.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/master-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
- uses: actions/checkout@v4
- name: setup .net
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
dotnet-version: |
8.0.x
9.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/master-pr-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
- uses: actions/checkout@v4
- name: setup .net
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
dotnet-version: |
8.0.x
9.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/mysqlconnector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
- uses: actions/checkout@v4
- name: setup .net
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.*
dotnet-version: |
8.0.x
9.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
- uses: actions/checkout@v4
- name: setup .net
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.*
dotnet-version: |
8.0.x
9.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/release-xxx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
- uses: actions/checkout@v4
- name: setup .net
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.*
dotnet-version: |
8.0.x
9.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/test-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
- uses: actions/checkout@v4
- name: setup .net
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.*
dotnet-version: |
8.0.x
9.0.x

- name: Install dependencies
run: dotnet restore
Expand Down
9 changes: 9 additions & 0 deletions src/AgileConfig.Server.Apisite/ASCII_FONT.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using Figgle;

namespace AgileConfig.Server.Apisite
{
[EmbedFiggleFont(memberName: "Font", fontName: "ogre")]
internal static partial class ASCII_FONT
{
}
}
10 changes: 6 additions & 4 deletions src/AgileConfig.Server.Apisite/AgileConfig.Server.Apisite.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
<AssemblyVersion>1.9.13</AssemblyVersion>
<Version>1.9.13</Version>
<PackageVersion>1.9.13</PackageVersion>
<AssemblyVersion>1.9.14</AssemblyVersion>
<Version>1.9.14</Version>
<PackageVersion>1.9.14</PackageVersion>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<FileVersion>1.9.13</FileVersion>
<FileVersion>1.9.14</FileVersion>
<Authors>kklldog</Authors>
<Company>kklldog</Company>
</PropertyGroup>
Expand Down Expand Up @@ -41,6 +41,8 @@
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.8.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.5.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="6.5.0" />
<PackageReference Include="Figgle.Generator" Version="0.6.4" PrivateAssets="all" />
<PackageReference Include="Figgle.Fonts" Version="0.6.5" />
</ItemGroup>

<ItemGroup>
Expand Down
27 changes: 19 additions & 8 deletions src/AgileConfig.Server.Apisite/Program.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
using System;
using AgileConfig.Server.Common;
using AgileConfig.Server.Common;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using OpenTelemetry.Resources;
using OpenTelemetry.Logs;
using OpenTelemetry.Exporter;
using OpenTelemetry.Logs;
using OpenTelemetry.Resources;
using System;
using System.Reflection;

namespace AgileConfig.Server.Apisite
{
Expand All @@ -16,10 +17,10 @@ public class Program

public static void Main(string[] args)
{
var basePath = AppDomain.CurrentDomain.BaseDirectory;
Console.WriteLine("current dir path: " + basePath);
PrintBasicSysInfo();

var builder = new ConfigurationBuilder()
.SetBasePath(basePath);
.SetBasePath(AppDomain.CurrentDomain.BaseDirectory);
#if DEBUG
Global.Config =
builder
Expand All @@ -36,6 +37,16 @@ public static void Main(string[] args)
host.Run();
}

private static void PrintBasicSysInfo()
{
var appVer = Assembly.GetAssembly(typeof(Program))?.GetName()?.Version?.ToString();
var basePath = AppDomain.CurrentDomain.BaseDirectory;

Console.WriteLine(ASCII_FONT.Font.Render($"Agile Config"));
Console.WriteLine("Version: {0}", appVer);
Console.WriteLine("Path: {0}", basePath);
}

private static IWebHostBuilder CreateWebHostBuilder(string[] args)
{
return WebHost.CreateDefaultBuilder(args).ConfigureLogging(
Expand Down Expand Up @@ -67,7 +78,7 @@ private static void AddOtlpLogging(ILoggingBuilder builder)
expOp.Endpoint = new Uri(Appsettings.OtlpLogsEndpoint);
if (!string.IsNullOrEmpty(Appsettings.OtlpLogsHeaders))
{
expOp.Headers = Appsettings.OtlpLogsHeaders;
expOp.Headers = Appsettings.OtlpLogsHeaders;
}
});
});
Expand Down
4 changes: 2 additions & 2 deletions src/AgileConfig.Server.Apisite/appsettings.Development.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"serviceUnhealthInterval": 30, // 判断服务不健康的间隔,超出这个时间没响应过则认为不健康,单位:秒
"removeServiceInterval": 0, // 如果一个服务超出这个时间没有响应,则直接移除这个服务,单位:秒;如果设定为 <= 0,则不会移除,默认 0 。
"pathBase": "", //使用反向代理的时候,或许需要修改这个值 /xxx 必须/开头
"adminConsole": false,
"adminConsole": true,
"saPassword": "123456", //super admin 的密码
"defaultApp": "myapp", // 默认应用,每次重启都会尝试新建
"cluster": false, // 集群模式:服务启动后自动加入节点列表,服务启动的时候会获取容器的ip,端口默认5000,适合 docker compose 环境使用
Expand All @@ -45,7 +45,7 @@
//"provider": "oracle",
//"conn": "user id=x;password=x;data source=192.168.0.123/orcl"
//"provider": "mysql",
//"conn": "Database=agile_config;Data Source=192.168.0.125;User Id=root;Password=x;port=13306;Allow User Variables=true;",
//"conn": "Database=agileconfig;Data Source=192.168.0.125;User Id=root;Password=123456;port=3306;Allow User Variables=true;",
//"provider": "mongodb",
//"conn": "mongodb://192.168.0.125:27017/agile_config_1",
"env": {
Expand Down
Loading