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
4 changes: 2 additions & 2 deletions src/Aspire.Hosting.Docker/DockerComposeEnvironmentResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ private async Task DockerComposeUpAsync(PipelineStepContext context)
}
else
{
await deployTask.CompleteAsync($"Docker Compose deployment complete for **{Name}**", CompletionState.Completed, context.CancellationToken).ConfigureAwait(false);
await deployTask.CompleteAsync($"Service **{Name}** is now running with Docker Compose locally", CompletionState.Completed, context.CancellationToken).ConfigureAwait(false);
}
}
}
Expand Down Expand Up @@ -364,7 +364,7 @@ private string GetEnvFilePath(PipelineStepContext context)
var outputPath = PublishingContextUtils.GetEnvironmentOutputPath(context, this);
var hostEnvironment = context.Services.GetService<Microsoft.Extensions.Hosting.IHostEnvironment>();
var environmentName = hostEnvironment?.EnvironmentName ?? Name;
var envFilePath = Path.Combine(outputPath, $"{environmentName}.env");
var envFilePath = Path.Combine(outputPath, $".env.{environmentName}");
return envFilePath;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ internal static partial class DockerComposePublisherLoggerExtensions
[LoggerMessage(LogLevel.Information, "No resources found in the model.")]
internal static partial void EmptyModel(this ILogger logger);

[LoggerMessage(LogLevel.Information, "Successfully generated Compose output in '{OutputPath}'")]
[LoggerMessage(LogLevel.Debug, "Successfully generated Compose output in '{OutputPath}'")]
internal static partial void FinishGeneratingDockerCompose(this ILogger logger, string outputPath);

[LoggerMessage(LogLevel.Warning, "Failed to get container image for resource '{ResourceName}', it will be skipped in the output.")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ public async Task PrepareStep_GeneratesCorrectEnvFileWithDefaultEnvironmentName(
var app = builder.Build();
app.Run();

var envFileContent = await File.ReadAllTextAsync(Path.Combine(tempDir.Path, "Production.env"));
var envFileContent = await File.ReadAllTextAsync(Path.Combine(tempDir.Path, ".env.Production"));
await Verify(envFileContent, "env")
.UseParameters("default-environment");
}
Expand Down Expand Up @@ -549,7 +549,7 @@ public async Task PrepareStep_GeneratesCorrectEnvFileWithCustomEnvironmentName()
app.Run();

// Verify that the env file is created with the custom environment name
var envFilePath = Path.Combine(tempDir.Path, "Staging.env");
var envFilePath = Path.Combine(tempDir.Path, ".env.Staging");
Assert.True(File.Exists(envFilePath), $"Expected env file at {envFilePath}");

var envFileContent = await File.ReadAllTextAsync(envFilePath);
Expand Down Expand Up @@ -583,7 +583,7 @@ public async Task PrepareStep_GeneratesEnvFileWithVariousParameterTypes()
var app = builder.Build();
app.Run();

var envFileContent = await File.ReadAllTextAsync(Path.Combine(tempDir.Path, "Production.env"));
var envFileContent = await File.ReadAllTextAsync(Path.Combine(tempDir.Path, ".env.Production"));
await Verify(envFileContent, "env")
.UseParameters("various-parameters");
}
Expand Down