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 RunWith/PublishWith extensions for all With methods #8

Open
DamianEdwards opened this issue May 31, 2024 · 1 comment
Open

Add RunWith/PublishWith extensions for all With methods #8

DamianEdwards opened this issue May 31, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@DamianEdwards
Copy link
Member

DamianEdwards commented May 31, 2024

This has been started but needs to be completed. Idea is that the pattern becomes WithXXX methods apply in all execution modes, whereas RunWithXXX/PublishWithXXX only apply in the associated execution mode, matching the pattern established for AsXXX/RunAsXXX/PublishAsXXX methods.

var cache = builder.AddRedis("cache")
    .RunWithBindMount("./cache-data", "/data")
    .PublishWithVolume("cache-data", "/data")
    .WithPersistence();

var cacheParameter = builder.AddParameter("cache-param");

builder.AddProject<Projects.WebApp>("webapp")
    .RunWithReference(cache)
    .PublishWithParameter(cacheParameter);

Should do it for the resource-specific WithDataVolume/WithDataBindMount, etc. methods too.

@DamianEdwards
Copy link
Member Author

We have the packages for PostgreSQL, SQL Server, and RabbitMQ so we can add the matching methods there too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant