You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Purpose of the feature.
I'd like to be able to integrate DocumentDB (PostgreSQL extension) into ASP.NET projects more easily using .NET Aspire. The goal is to enable .NET developers to easily try DocumentDB or replace/augment their existing MongoDB/PostgreSQL usage with DocumentDB in a smooth, "drop-in" manner.
Describe the solution you'd like
An official or documented approach that shows how to configure and use DocumentDB alongside PostgreSQL in .NET Aspire. Ideally, this would look similar to existing Aspire integrations for PostgreSQL and MongoDB, including any recommended connection string formats, sample configuration files, or code examples.
Describe alternatives you've considered
Manually configuring Docker containers and connection strings without official guidance.
Continuing to run separate MongoDB instances instead of consolidating data storage under PostgreSQL + DocumentDB.
Using a FerretDB configuration outside the context of .NET Aspire.
Additional context
Having explicit Aspire documentation or integration support would make it easier for .NET developers to adopt this new extension.
My current ASP.NET solution uses both PostgreSQL and MongoDB (previously migrated from CosmosDB).
DocumentDB promises a PostgreSQL extension approach that could simplify my infrastructure and allow me to drop MongoDB.
A typical scenario might involve spinning up a Docker container for PostgreSQL + DocumentDB, then referencing it in the .NET Aspire configuration, much as we do with existing providers.
@Matthewsre thanks for your request. Sounds something interesting. I see 2 scenarios here:
Aspire + PostgreSQL with DocumentDB extension
For this one I think either providing a docker container that contains both would work or even using the PostgreSQL Hosting plugin in the Aspire service and then adding a .withCommand to run a command at startup that downloads a tar with the documentDB extension, installs it and then runs: CREATE EXTENSION documentdb CASCADE; on the PostgreSQL database.
Aspire + MongoDriver + FerretDB + DocumentDB
For this one I think we would need a FerretDB Hosting and Client plugins to do the right hosting and setup on the client side for the mongo driver to connect to FerretDB. Seems like more work would be needed and probably would need to be orchestrated on the FerretDB side.
For the first scenario (Aspire + PostgreSQL with DocumentDB extension):
Both proposals seem important and valid, but for my use case I already have a PostgreSQL configured with Aspire, so I would be in favor of extending that instead of a separate docker container.
(The feature request on the Aspire repo for DocumentDB integration was added to the Backlog)
For the second scenario (Aspire + MongoDriver + FerretDB + DocumentDB):
Depending on how this is implemented, I could see this having a dependency on the first scenario.
The feature request I opened on the Aspire repo for FerretDB has been closed (dotnet/aspire#7322) and I have opened a new issue on the Aspire Community Toolkit: CommunityToolkit/Aspire#432.
Purpose of the feature.
I'd like to be able to integrate DocumentDB (PostgreSQL extension) into ASP.NET projects more easily using .NET Aspire. The goal is to enable .NET developers to easily try DocumentDB or replace/augment their existing MongoDB/PostgreSQL usage with DocumentDB in a smooth, "drop-in" manner.
Describe the solution you'd like
An official or documented approach that shows how to configure and use DocumentDB alongside PostgreSQL in .NET Aspire. Ideally, this would look similar to existing Aspire integrations for PostgreSQL and MongoDB, including any recommended connection string formats, sample configuration files, or code examples.
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: