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 WithVolumeMount Extension Method to Container Resource Class #1447

Closed
Prev Previous commit
Next Next commit
(for example, not meant to keep) add methods to eshop sample to show …
…usage with container resources
  • Loading branch information
josephaw1022 committed Dec 17, 2023
commit e720dde61ed69e777fa5442d19a2f8c7ee093c17
9 changes: 6 additions & 3 deletions samples/eShopLite/AppHost/Program.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
var builder = DistributedApplication.CreateBuilder(args);

var catalogDb = builder.AddPostgres("postgres").AddDatabase("catalogdb");
var catalogDb = builder.AddPostgresContainer("postgres")
.WithNamedVolume();

var basketCache = builder.AddRedis("basketcache");
var basketCache = builder.AddRedisContainer("basketcache")
.WithNamedVolume();

var catalogService = builder.AddProject<Projects.CatalogService>("catalogservice")
.WithReference(catalogDb)
.WithReplicas(2);

var messaging = builder.AddRabbitMQ("messaging");
var messaging = builder.AddRabbitMQContainer("messaging")
.WithNamedVolume();

var basketService = builder.AddProject("basketservice", @"..\BasketService\BasketService.csproj")
.WithReference(basketCache)
Loading