diff --git a/Exceptionless.sln b/Exceptionless.sln index fd686622d6..2ad9540a1c 100644 --- a/Exceptionless.sln +++ b/Exceptionless.sln @@ -29,8 +29,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Exceptionless.Tests", "test EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Exceptionless.Job", "src\Exceptionless.Job\Exceptionless.Job.csproj", "{788BA00C-FFBE-42A9-92A3-89E24FC137B5}" EndProject -Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker\docker-compose.dcproj", "{9F933018-9E8B-4649-8C9A-D217B5E1C184}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "http", "http", "{97ED03A0-8C49-4B15-8D93-C56AF4DDC30F}" ProjectSection(SolutionItems) = preProject tests\http\admin.http = tests\http\admin.http @@ -45,7 +43,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "http", "http", "{97ED03A0-8 tests\http\webhooks.http = tests\http\webhooks.http EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Exceptionless.AppHost", "src\Exceptionless.AppHost\Exceptionless.AppHost.csproj", "{E730BF07-50D3-48C4-9C39-45D8BCB2A35A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Exceptionless.AppHost", "src\Exceptionless.AppHost\Exceptionless.AppHost.csproj", "{E730BF07-50D3-48C4-9C39-45D8BCB2A35A}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -73,10 +71,6 @@ Global {788BA00C-FFBE-42A9-92A3-89E24FC137B5}.Debug|Any CPU.Build.0 = Debug|Any CPU {788BA00C-FFBE-42A9-92A3-89E24FC137B5}.Release|Any CPU.ActiveCfg = Release|Any CPU {788BA00C-FFBE-42A9-92A3-89E24FC137B5}.Release|Any CPU.Build.0 = Release|Any CPU - {9F933018-9E8B-4649-8C9A-D217B5E1C184}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9F933018-9E8B-4649-8C9A-D217B5E1C184}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9F933018-9E8B-4649-8C9A-D217B5E1C184}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9F933018-9E8B-4649-8C9A-D217B5E1C184}.Release|Any CPU.Build.0 = Release|Any CPU {E730BF07-50D3-48C4-9C39-45D8BCB2A35A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E730BF07-50D3-48C4-9C39-45D8BCB2A35A}.Debug|Any CPU.Build.0 = Debug|Any CPU {E730BF07-50D3-48C4-9C39-45D8BCB2A35A}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/src/Exceptionless.AppHost/ElasticsearchExtensions.cs b/src/Exceptionless.AppHost/ElasticsearchExtensions.cs index 6602fb070d..4ae3e83551 100644 --- a/src/Exceptionless.AppHost/ElasticsearchExtensions.cs +++ b/src/Exceptionless.AppHost/ElasticsearchExtensions.cs @@ -1,6 +1,5 @@ using System.Text; using Aspire.Hosting.Lifecycle; -using Aspire.Hosting.Utils; using Microsoft.Extensions.Configuration; namespace Aspire.Hosting; @@ -21,7 +20,7 @@ public static IResourceBuilder AddElasticsearch(this IDis { var elasticsearch = new ElasticsearchResource(name); return builder.AddResource(elasticsearch) - .WithHttpEndpoint(containerPort: 9200, hostPort: port, name: "http") + .WithHttpEndpoint(port: 9200, targetPort: port, name: "http") .WithAnnotation(new ContainerImageAnnotation { Image = "docker.elastic.co/elasticsearch/elasticsearch", Tag = "8.12.2" }) .WithEnvironment("discovery.type", "single-node") .WithEnvironment("xpack.security.enabled", "false") @@ -52,7 +51,7 @@ public static IResourceBuilder WithKibana(this IResourceB builder.ApplicationBuilder.AddResource(resource) .WithAnnotation(new ContainerImageAnnotation { Image = "docker.elastic.co/kibana/kibana", Tag = "8.12.2" }) .WithEnvironment("XPACK_SECURITY_ENABLED", "false") - .WithHttpEndpoint(containerPort: 5601, hostPort: hostPort, name: containerName) + .WithHttpEndpoint(targetPort: 5601, port: hostPort, name: containerName) .ExcludeFromManifest(); return builder; @@ -81,6 +80,8 @@ public string? ConnectionStringExpression } } + ReferenceExpression IResourceWithConnectionString.ConnectionStringExpression => throw new NotImplementedException(); + /// /// Gets the connection string for the Elasticsearch server. /// diff --git a/src/Exceptionless.AppHost/Exceptionless.AppHost.csproj b/src/Exceptionless.AppHost/Exceptionless.AppHost.csproj index 495f615006..b42478da3e 100644 --- a/src/Exceptionless.AppHost/Exceptionless.AppHost.csproj +++ b/src/Exceptionless.AppHost/Exceptionless.AppHost.csproj @@ -1,5 +1,4 @@ - Exe net8.0 @@ -7,14 +6,13 @@ enable true - - - - - - - + + + + + + \ No newline at end of file diff --git a/src/Exceptionless.AppHost/Program.cs b/src/Exceptionless.AppHost/Program.cs index 4c0e287402..969f16782b 100644 --- a/src/Exceptionless.AppHost/Program.cs +++ b/src/Exceptionless.AppHost/Program.cs @@ -6,18 +6,16 @@ var cache = builder.AddRedis("Redis") .WithRedisCommander(); -var job = builder.AddProject("Jobs") +var job = builder.AddProject("Jobs", "AllJobs") .WithReference(cache) - .WithReference(elastic) - .WithLaunchProfile("AllJobs"); + .WithReference(elastic); -var api = builder.AddProject("Api") +var api = builder.AddProject("Api", "Exceptionless API") .WithReference(cache) - .WithReference(elastic) - .WithLaunchProfile("Exceptionless API"); + .WithReference(elastic); builder.AddNpmApp("Web", "../../src/Exceptionless.Web/ClientApp", "dev") .WithReference(api) - .WithEndpoint(containerPort: 5173, scheme: "http", env: "PORT"); + .WithEndpoint(port: 5173, scheme: "http", env: "PORT"); builder.Build().Run(); diff --git a/src/Exceptionless.AppHost/Properties/launchSettings.json b/src/Exceptionless.AppHost/Properties/launchSettings.json index 4006eed077..f2c4f2b125 100644 --- a/src/Exceptionless.AppHost/Properties/launchSettings.json +++ b/src/Exceptionless.AppHost/Properties/launchSettings.json @@ -1,6 +1,18 @@ { "$schema": "https://json.schemastore.org/launchsettings.json", "profiles": { + "https": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "https://localhost:17224;http://localhost:15212", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development", + "DOTNET_ENVIRONMENT": "Development", + "DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21224", + "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22224" + } + }, "http": { "commandName": "Project", "dotnetRunMessages": true, @@ -9,8 +21,9 @@ "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development", "DOTNET_ENVIRONMENT": "Development", - "DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:16298" + "DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:16298", + "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:22077" } } } -} +} \ No newline at end of file