Skip to content

Latest commit

 

History

History
42 lines (27 loc) · 1.19 KB

README.md

File metadata and controls

42 lines (27 loc) · 1.19 KB

CommunityToolkit.Aspire.Hosting.RustFs library

Provides extension methods and resource definitions for the Aspire AppHost to support running RustFs containers.

Getting Started

Install the package

In your AppHost project, install the package using the following command:

dotnet add package CommunityToolkit.Aspire.Hosting.RustFs

Example usage

Then, in the Program.cs file of AppHost, add a RustFs resource and consume the connection using the following methods:

var builder = DistributedApplication.CreateBuilder(args);

var rustfs = builder.AddRustFs("rustfs")
    .WithDataVolume()
    .AddBucket("mybucket");

builder.Build().Run();

Buckets

AddBucket registers each bucket as a child RustFsBucketResource so it appears in the Aspire Dashboard. After the RustFs server becomes healthy, the integration issues a signed S3 PUT /{bucket} request from the AppHost process to provision the bucket; there is no minio/mc sidecar container.

Multiple buckets can be added at once via AddBucket(IReadOnlyList<string>):

builder.AddRustFs("rustfs")
    .AddBucket(["images", "documents", "audit-log"]);