Skip to content

Commit 40a62e5

Browse files
[WIP] Update resource endpoints display for Docker Compose deploy (#13217)
* Initial plan * Address review feedback on DockerComposeServiceResource Co-authored-by: captainsafia <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: captainsafia <[email protected]>
1 parent 3c202d9 commit 40a62e5

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/Aspire.Hosting.Docker/DockerComposeServiceResource.cs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ public DockerComposeServiceResource(string name, IResource resource, DockerCompo
3737
_composeEnvironmentResource = composeEnvironmentResource;
3838

3939
// Add pipeline step annotation to display endpoints after deployment
40-
Annotations.Add(new PipelineStepAnnotation((factoryContext) =>
40+
Annotations.Add(new PipelineStepAnnotation(_ =>
4141
{
4242
var steps = new List<PipelineStep>();
4343

4444
var printResourceSummary = new PipelineStep
4545
{
46-
Name = $"print-{resource.Name}-summary",
47-
Action = async ctx => await PrintEndpointsAsync(ctx, composeEnvironmentResource).ConfigureAwait(false),
46+
Name = $"print-{_targetResource.Name}-summary",
47+
Action = async ctx => await PrintEndpointsAsync(ctx, _composeEnvironmentResource).ConfigureAwait(false),
4848
Tags = ["print-summary"],
4949
RequiredBySteps = [WellKnownPipelineSteps.Deploy]
5050
};
@@ -309,13 +309,6 @@ private void AddVolumes(Service composeService)
309309
private async Task PrintEndpointsAsync(PipelineStepContext context, DockerComposeEnvironmentResource environment)
310310
{
311311
var outputPath = PublishingContextUtils.GetEnvironmentOutputPath(context, environment);
312-
var dockerComposeFilePath = Path.Combine(outputPath, "docker-compose.yaml");
313-
314-
if (!File.Exists(dockerComposeFilePath))
315-
{
316-
context.Logger.LogWarning("Docker Compose file not found at {Path}", dockerComposeFilePath);
317-
return;
318-
}
319312

320313
try
321314
{

0 commit comments

Comments
 (0)