* add aspire

* add healthchecks
This commit is contained in:
Oda
2025-04-21 04:21:40 +07:00
committed by GitHub
parent 528c62a0a1
commit 3113e5d278
24 changed files with 427 additions and 100 deletions

View File

@@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsAspireHost>true</IsAspireHost>
<UserSecretsId>2d8fdbdd-b3e0-4716-8e00-56064804c76a</UserSecretsId>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Aspire.Hosting.AppHost" Version="8.2.2"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Managing.Api.Workers\Managing.Api.Workers.csproj"/>
<ProjectReference Include="..\Managing.Api\Managing.Api.csproj"/>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,13 @@
var builder = DistributedApplication.CreateBuilder(args);
// Add API projects
var managingApi = builder.AddProject<Projects.Managing_Api>("managing-api");
var workersApi = builder.AddProject<Projects.Managing_Api_Workers>("worker-api");
// No need to add containers - your APIs will use their existing connection strings
// from their respective appsettings.json files
// Connect services to resources
workersApi.WithReference(managingApi);
builder.Build().Run();

View File

@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}

View File

@@ -0,0 +1,26 @@
{
"ManagingDatabase": {
"ConnectionString": "mongodb://localhost:27017",
"DatabaseName": "ManagingDb"
},
"InfluxDb": {
"Url": "http://localhost:8086/",
"Organization": "managing-org",
"Token": "Fw2FPL2OwTzDHzSbR2Sd5xs0EKQYy00Q-hYKYAhr9cC1_q5YySONpxuf_Ck0PTjyUiF13xXmi__bu_pXH-H9zA=="
},
"Privy": {
"AppId": "cm6f47n1l003jx7mjwaembhup",
"AppSecret": "63Chz2z5M8TgR5qc8dznSLRAGTHTyPU4cjdQobrBF1Cx5tszZpTuFgyrRd7hZ2k6HpwDz3GEwQZzsCqHb8Z311bF"
},
"Discord": {
"ApplicationId": "",
"PublicKey": "",
"TokenId": "",
"SignalChannelId": 966080506473099314,
"TradesChannelId": 998374177763491851,
"TroublesChannelId": 1015761955321040917,
"RequestsChannelId": 1018589494968078356,
"ButtonExpirationMinutes": 2
},
"AllowedHosts": "*"
}

View File

@@ -0,0 +1,19 @@
{
"ManagingDatabase": {
"ConnectionString": "mongodb://admin:r8oJiDIKbsEi@mongo-db.apps.managing.live:27017/?authMechanism=SCRAM-SHA-256",
"DatabaseName": "ManagingDb"
},
"InfluxDb": {
"Url": "https://influx-db.apps.managing.live",
"Organization": "managing-org",
"Token": "eOuXcXhH7CS13Iw4CTiDDpRjIjQtEVPOloD82pLPOejI4n0BsEj1YzUw0g3Cs1mdDG5m-RaxCavCMsVTtS5wIQ=="
},
"Privy": {
"AppId": "cm6f47n1l003jx7mjwaembhup",
"AppSecret": "63Chz2z5M8TgR5qc8dznSLRAGTHTyPU4cjdQobrBF1Cx5tszZpTuFgyrRd7hZ2k6HpwDz3GEwQZzsCqHb8Z311bF"
},
"ElasticConfiguration": {
"Uri": "http://elasticsearch:9200"
},
"AllowedHosts": "*"
}

View File

@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning",
"Aspire.Hosting.Dcp": "Warning"
}
}
}