Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FerretDB Integration #432

Closed
Matthewsre opened this issue Jan 30, 2025 · 3 comments
Closed

Add FerretDB Integration #432

Matthewsre opened this issue Jan 30, 2025 · 3 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed integration A new .NET Aspire integration Stale

Comments

@Matthewsre
Copy link

.NET Aspire issue link

dotnet/aspire#7322

Overview

I have an ASP.NET application that uses both PostgreSQL and MongoDB. FerretDB (powered by DocumentDB, which was recently open-sourced by Microsoft) provides a MongoDB-compatible layer on top of PostgreSQL. I would like an official way to configure FerretDB within .NET Aspire so I can either replace MongoDB entirely or simplify infrastructure.

Usage example

A straightforward integration in .NET Aspire similar to existing data providers/integrations. Since this provides a MongoDB compatibility layer, ideally it could be used the same way as the MongoDB integration (https://learn.microsoft.com/en-us/dotnet/aspire/database/mongodb-integration?tabs=dotnet-cli):

var builder = DistributedApplication.CreateBuilder(args);

var ferret = builder.AddFerretDB("mongo")
                   .WithLifetime(ContainerLifetime.Persistent);

var ferretdb = ferret .AddDatabase("mongodb");

builder.AddProject<Projects.ExampleProject>()
       .WithReference(ferretdb)
       .WaitFor(ferretdb);

Another consideration is leveraging an existing PostgreSQL, not sure what that would really look like to implement, but for the sake of providing a pseudo example:

var builder = DistributedApplication.CreateBuilder(args);

var postgres = builder.AddPostgres("postgres");
var postgresdb = postgres.AddDatabase("postgresdb");

var ferret = builder.AddFerretDB("mongo")
                   .WithReference(postgres)
                   .WithLifetime(ContainerLifetime.Persistent);

var ferretdb = ferret .AddDatabase("mongodb");

builder.AddProject<Projects.ExampleProject>()
       .WithReference(postgresdb)
       .WithReference(ferretdb)
       .WaitFor(ferretdb);

Additional context

Help us help you

No, just wanted to propose this

@aaronpowell aaronpowell added good first issue Good for newcomers help wanted Extra attention is needed integration A new .NET Aspire integration labels Jan 31, 2025
Copy link

We have noticed this issue has not been updated within 21 days. If there is no action on this issue in the next 14 days, we will automatically close it. You can use /stale-extend to extend the window.

@github-actions github-actions bot added the Stale label Feb 22, 2025
Copy link

github-actions bot commented Mar 9, 2025

This issue has been stale for 5 weeks and has been automatically closed.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 9, 2025
@davidfowl
Copy link
Contributor

This stalebot is aggressive

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed integration A new .NET Aspire integration Stale
Projects
None yet
Development

No branches or pull requests

3 participants