Was trying to create a database (retmarkdb), but only datatabase "postgres" (with password 'retmark123') is created.
// RetmarkApp.AppHost/AppHost.cs
var builder = DistributedApplication.CreateBuilder(args);
// 1. PostgreSQL с фиксированным паролем
var postgres = builder.AddPostgres("postgresdb")
.WithEnvironment("POSTGRES_PASSWORD", "retmark123")
.WithDataVolume()
.WithPgAdmin();
// 2. Создаём базу автоматически через скрипт
var databaseName = "retmarkdb";
var creationScript = $$"""
-- Create the database
CREATE DATABASE {{databaseName}};
""";
var db = postgres.AddDatabase(databaseName)
.WithCreationScript(creationScript);
// 3. MongoDB
var mongo = builder.AddMongoDB("mongo")
.WithDataVolume()
.WithMongoExpress();
// 4. Ваш сервер
builder.AddProject<Projects.RetmarkApp_Server>("retmark-server")
.WithReference(db)
.WithReference(mongo)
.WithExternalHttpEndpoints()
.WaitFor(db);
builder.Build().Run();
postgresat all. Are you looking at the wrong container? Or a container created by a previous run with different code? What does the generated docker-compose file look like?postgresis used. Since you haven't provided separate database names, you created the same database under two different resource names, on the server namedpostgresdb