This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
How to keep a persistent volume with AddSqlServerContainer? #974
Labels
area-app-model
Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication
I am able to use AddSqlContainer successfully in my AppHost project. The problem is that every time I stop AppHost, the container is destroyed (which is fine) but also all the data I had in the DB is destroyed with it.
I'd like to have a way to specify a persistent volume that should survive beyond the lifetime of the AppHost and get reconnected on subsequent runs.
For reference, this is my current setup:
And this is how I run my SQL Server container manually today:
Also, I already tried using WithVolumeMount() but it makes no difference, the data is gone.
The text was updated successfully, but these errors were encountered: