-
Notifications
You must be signed in to change notification settings - Fork 128
Add Neon integration for .NET Aspire #894
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: aaronpowell <[email protected]>
Co-authored-by: aaronpowell <[email protected]>
Co-authored-by: aaronpowell <[email protected]>
Co-authored-by: aaronpowell <[email protected]>
Co-authored-by: aaronpowell <[email protected]>
Minimum allowed line rate is |
@Boburmirzo I've had Copilot spin up the starting points for an integration to host Neon Local in Aspire, but as I'm unfamiliar with Neon I'm only guessing that the design would fit. One concern I have is that, based on my understanding, you need to have a Neon account to run Neon Locally, which I worry would have an impact on our ability to provide a good set of tests, so I want to confirm that that is the case. |
Closes #398
This PR adds support for Neon, a serverless PostgreSQL-compatible database, to the .NET Aspire Community Toolkit.
Overview
Neon is a modern, open-source serverless PostgreSQL-compatible database with managed integration for Azure. While developers can use existing PostgreSQL or Npgsql client integrations, this dedicated integration provides a seamless experience for both local development with Neon containers and production deployment with Neon's cloud service.
What's New
Hosting Integration (
CommunityToolkit.Aspire.Hosting.Neon
)Adds hosting support for Neon PostgreSQL containers in .NET Aspire applications:
Features:
neondatabase/neon:latest
imageAddDatabase()
WithDataVolume()
andWithDataBindMount()
Client Integration (
CommunityToolkit.Aspire.Neon
)Provides PostgreSQL client support leveraging Aspire.Npgsql:
Features:
Cloud Service Integration
For production scenarios using Neon's cloud service, simply provide your Neon connection string:
Neon's unique features like database branching are available when using their cloud service and can be managed through their API or CLI alongside this integration.
Additional Resources
Testing
The implementation includes:
This integration follows .NET Aspire Community Toolkit conventions and provides a foundation for developers to work with Neon databases in their Aspire applications, whether for local development or cloud deployment.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
cflvsblobprodcus383.vsblob.vsassets.io
dotnet restore
(dns block)dnceng.pkgs.visualstudio.com
dotnet restore
(dns block)dotnet build
(dns block)dotnet test --no-build --no-restore
(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
Fixes #398
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.