diff --git a/src/frontend/src/content/docs/integrations/ai/ollama/ollama-connect.mdx b/src/frontend/src/content/docs/integrations/ai/ollama/ollama-connect.mdx index b3d3bcd5e..e1f70ab7e 100644 --- a/src/frontend/src/content/docs/integrations/ai/ollama/ollama-connect.mdx +++ b/src/frontend/src/content/docs/integrations/ai/ollama/ollama-connect.mdx @@ -17,6 +17,7 @@ import ollamaIcon from '@assets/icons/ollama-icon.png'; alt="Ollama logo" width={100} height={100} + fit="contain" class:list={'float-inline-left icon'} data-zoom-off /> @@ -104,8 +105,8 @@ public class ExampleService(IOllamaApiClient ollama) To register multiple `IOllamaApiClient` instances with different connection names, use `AddKeyedOllamaApiClient`: ```csharp title="Program.cs" -builder.AddKeyedOllamaApiClient(name: "chat"); -builder.AddKeyedOllamaApiClient(name: "embeddings"); +builder.AddKeyedOllamaApiClient(connectionName: "chat"); +builder.AddKeyedOllamaApiClient(connectionName: "embeddings"); ``` Then resolve each instance by key: diff --git a/src/frontend/src/content/docs/integrations/ai/ollama/ollama-get-started.mdx b/src/frontend/src/content/docs/integrations/ai/ollama/ollama-get-started.mdx index dd284a495..00d7fde60 100644 --- a/src/frontend/src/content/docs/integrations/ai/ollama/ollama-get-started.mdx +++ b/src/frontend/src/content/docs/integrations/ai/ollama/ollama-get-started.mdx @@ -16,6 +16,7 @@ import ollamaIcon from '@assets/icons/ollama-icon.png'; alt="Ollama logo" width={100} height={100} + fit="contain" class:list={'float-inline-left icon'} data-zoom-off /> diff --git a/src/frontend/src/content/docs/integrations/ai/ollama/ollama-host.mdx b/src/frontend/src/content/docs/integrations/ai/ollama/ollama-host.mdx index 436317f09..ff9d339e9 100644 --- a/src/frontend/src/content/docs/integrations/ai/ollama/ollama-host.mdx +++ b/src/frontend/src/content/docs/integrations/ai/ollama/ollama-host.mdx @@ -16,6 +16,7 @@ import ollamaIcon from '@assets/icons/ollama-icon.png'; alt="Ollama logo" width={100} height={100} + fit="contain" class:list={'float-inline-left icon'} data-zoom-off /> @@ -277,12 +278,12 @@ await ollama.addModel("llama3"); **AMD:** ```typescript title="apphost.mts" -import { createBuilder } from './.aspire/modules/aspire.mjs'; +import { createBuilder, OllamaGpuVendor } from './.aspire/modules/aspire.mjs'; const builder = await createBuilder(); const ollama = await builder.addOllama("ollama"); -await ollama.withGPUSupport({ vendor: "AMD" }); +await ollama.withGPUSupport({ vendor: OllamaGpuVendor.AMD }); await ollama.addModel("llama3"); @@ -290,7 +291,7 @@ await ollama.addModel("llama3"); ``` @@ -339,7 +340,7 @@ await builder.addNodeApp("api", "./api", "index.js") -Only models in GGUF format are supported. Ollama automatically prefixes `hf.co/` if the model name doesn't already start with `hf.co/` or `huggingface.co/`. +Only models in GGUF format are supported. The integration automatically prefixes `hf.co/` to the model name if it doesn't already start with `hf.co/` or `huggingface.co/`, so Ollama can resolve it from Hugging Face. ## Add Ollama resource with parameters diff --git a/src/frontend/src/content/docs/integrations/databases/kurrentdb/kurrentdb-connect.mdx b/src/frontend/src/content/docs/integrations/databases/kurrentdb/kurrentdb-connect.mdx index 11323c3fb..d142fc122 100644 --- a/src/frontend/src/content/docs/integrations/databases/kurrentdb/kurrentdb-connect.mdx +++ b/src/frontend/src/content/docs/integrations/databases/kurrentdb/kurrentdb-connect.mdx @@ -4,20 +4,22 @@ seoTitle: "Connect to KurrentDB from Aspire apps (C#, Node.js)" description: Learn how to connect to KurrentDB from C#, Go, Python, and TypeScript consuming apps in an Aspire solution. --- -import { Image } from 'astro:assets'; import { Aside, Badge, Tabs, TabItem } from '@astrojs/starlight/components'; import InstallDotNetPackage from '@components/InstallDotNetPackage.astro'; +import ThemeImage from '@components/ThemeImage.astro'; import kurrentIcon from '@assets/icons/kurrent-icon.png'; +import kurrentLightIcon from '@assets/icons/kurrent-light-icon.png'; -KurrentDB logo This page describes how consuming apps connect to a KurrentDB resource that's already modeled in your AppHost. For the AppHost API surface — adding a KurrentDB resource, data volumes, data bind mounts, and more — see [KurrentDB Hosting integration](../kurrentdb-host/). diff --git a/src/frontend/src/content/docs/integrations/databases/kurrentdb/kurrentdb-get-started.mdx b/src/frontend/src/content/docs/integrations/databases/kurrentdb/kurrentdb-get-started.mdx index 227bea252..caee48116 100644 --- a/src/frontend/src/content/docs/integrations/databases/kurrentdb/kurrentdb-get-started.mdx +++ b/src/frontend/src/content/docs/integrations/databases/kurrentdb/kurrentdb-get-started.mdx @@ -3,19 +3,21 @@ title: Get started with the KurrentDB integrations description: Learn how the Aspire KurrentDB integrations host a KurrentDB event store resource and connect the .NET client to your Aspire AppHost projects. --- -import { Image } from 'astro:assets'; import { Badge, LinkButton, Steps } from '@astrojs/starlight/components'; +import ThemeImage from '@components/ThemeImage.astro'; import kurrentIcon from '@assets/icons/kurrent-icon.png'; +import kurrentLightIcon from '@assets/icons/kurrent-light-icon.png'; -KurrentDB logo [KurrentDB](https://kurrent.io/) is an open-source event-sourcing database (formerly EventStoreDB) purpose-built for storing events as an immutable, append-only log. It delivers high availability and reliability for event-driven and event-sourcing architectures. The Aspire KurrentDB integration lets you model a KurrentDB server as a first-class resource in your AppHost, then hand the connection information to any consuming app — regardless of language. @@ -24,7 +26,7 @@ import kurrentIcon from '@assets/icons/kurrent-icon.png'; Adding KurrentDB through Aspire — rather than wiring up containers and connection strings by hand — gives you: -- **Zero-config local development.** Aspire runs KurrentDB from the [`docker.io/eventstore/eventstore`](https://hub.docker.com/r/eventstore/eventstore) container image with configuration generated automatically for you. +- **Zero-config local development.** Aspire runs KurrentDB from the [`docker.kurrent.io/kurrent-latest/kurrentdb`](https://docker.kurrent.io) container image with configuration generated automatically for you. - **Consistent connection info across languages.** Once you reference the KurrentDB resource from a consuming app, Aspire injects connection properties as environment variables in a predictable format that works from C#, TypeScript, Python, Go, or any other language. - **Built-in health checks.** The hosting integration automatically registers a health check so the dashboard and your orchestrator can tell when KurrentDB is ready. - **Dashboard observability.** The KurrentDB resource shows up in the Aspire dashboard with logs, status, and telemetry alongside your other services. diff --git a/src/frontend/src/content/docs/integrations/databases/kurrentdb/kurrentdb-host.mdx b/src/frontend/src/content/docs/integrations/databases/kurrentdb/kurrentdb-host.mdx index 518cafcb4..6d567d6c3 100644 --- a/src/frontend/src/content/docs/integrations/databases/kurrentdb/kurrentdb-host.mdx +++ b/src/frontend/src/content/docs/integrations/databases/kurrentdb/kurrentdb-host.mdx @@ -4,34 +4,36 @@ seoTitle: "Set up KurrentDB in the Aspire AppHost: hosting integration" description: Learn how to use the Aspire KurrentDB Hosting integration to orchestrate and configure a KurrentDB resource in an Aspire solution. --- -import { Image } from 'astro:assets'; -import { Aside, Badge, Steps } from '@astrojs/starlight/components'; +import { Aside, Badge, Steps, Tabs, TabItem } from '@astrojs/starlight/components'; import InstallPackage from '@components/InstallPackage.astro'; +import LearnMore from '@components/LearnMore.astro'; +import ThemeImage from '@components/ThemeImage.astro'; import kurrentIcon from '@assets/icons/kurrent-icon.png'; +import kurrentLightIcon from '@assets/icons/kurrent-light-icon.png'; -KurrentDB logo -This article is the reference for the Aspire KurrentDB Hosting integration. It enumerates the AppHost C# APIs that you use to model a KurrentDB resource in your [`AppHost`](/get-started/app-host/) project. +This article is the reference for the Aspire KurrentDB Hosting integration. It enumerates the AppHost APIs that you use to model a KurrentDB resource in your [`AppHost`](/get-started/app-host/) project. If you're new to the KurrentDB integration, start with the [Get started with KurrentDB integrations](/integrations/databases/kurrentdb/kurrentdb-get-started/) guide. For how consuming apps read the connection information this page exposes, see [Connect to KurrentDB](../kurrentdb-connect/). - - ## Installation To start building an Aspire app that uses KurrentDB, install the [📦 CommunityToolkit.Aspire.Hosting.KurrentDB](https://nuget.org/packages/CommunityToolkit.Aspire.Hosting.KurrentDB) NuGet package: + + + Or, choose a manual installation approach: @@ -44,10 +46,37 @@ Or, choose a manual installation approach: ``` + + + +```bash title="Terminal" +aspire add CommunityToolkit.Aspire.Hosting.KurrentDB +``` + + + Learn more about [`aspire add`](/reference/cli/commands/aspire-add/) in the command reference. + + +This updates your `aspire.config.json` with the KurrentDB hosting integration package: + +```json title="aspire.config.json" ins={3} +{ + "packages": { + "CommunityToolkit.Aspire.Hosting.KurrentDB": "*" + } +} +``` + + + + ## Add KurrentDB resource Once you've installed the hosting integration in your AppHost project, you can add a KurrentDB resource as shown in the following example: + + + ```csharp title="AppHost.cs" var builder = DistributedApplication.CreateBuilder(args); @@ -56,12 +85,31 @@ var kurrentdb = builder.AddKurrentDB("kurrentdb"); var exampleProject = builder.AddProject("apiservice") .WithReference(kurrentdb); -// After adding all resources, run the app... +builder.Build().Run(); +``` + + + + +```typescript title="apphost.mts" +import { createBuilder } from './.aspire/modules/aspire.mjs'; + +const builder = await createBuilder(); + +const kurrentdb = await builder.addKurrentDB("kurrentdb"); + +const exampleProject = await builder.addProject("apiservice", "../ExampleProject/ExampleProject.csproj"); +await exampleProject.withReference(kurrentdb); + +await builder.build().run(); ``` + + + -1. When Aspire adds a container image to the AppHost, as shown in the preceding example with the `docker.io/eventstore/eventstore` image, it creates a new KurrentDB instance on your local machine. +1. When Aspire adds a container image to the AppHost, as shown in the preceding example with the `docker.kurrent.io/kurrent-latest/kurrentdb` image, it creates a new KurrentDB instance on your local machine. 1. The AppHost reference call configures a connection in the consuming project named after the referenced KurrentDB resource, such as `kurrentdb` in the preceding example. @@ -75,6 +123,9 @@ var exampleProject = builder.AddProject("apiservice") Add a data volume to the KurrentDB resource as shown in the following example: + + + ```csharp title="AppHost.cs" var builder = DistributedApplication.CreateBuilder(args); @@ -84,15 +135,38 @@ var kurrentdb = builder.AddKurrentDB("kurrentdb") var exampleProject = builder.AddProject("apiservice") .WithReference(kurrentdb); -// After adding all resources, run the app... +builder.Build().Run(); +``` + + + + +```typescript title="apphost.mts" +import { createBuilder } from './.aspire/modules/aspire.mjs'; + +const builder = await createBuilder(); + +const kurrentdb = await builder.addKurrentDB("kurrentdb"); +await kurrentdb.withDataVolume(); + +const exampleProject = await builder.addProject("apiservice", "../ExampleProject/ExampleProject.csproj"); +await exampleProject.withReference(kurrentdb); + +await builder.build().run(); ``` + + + The data volume is used to persist KurrentDB data outside the lifecycle of its container. The data volume is mounted at the `/var/lib/kurrentdb` path in the KurrentDB container, and when a `name` parameter isn't provided, the name is generated at random. For more information on data volumes and details on why they're preferred over [bind mounts](#add-kurrentdb-resource-with-data-bind-mount), see [Docker docs: Volumes](https://docs.docker.com/engine/storage/volumes). ## Add KurrentDB resource with data bind mount Add a data bind mount to the KurrentDB resource as shown in the following example: + + + ```csharp title="AppHost.cs" var builder = DistributedApplication.CreateBuilder(args); @@ -102,9 +176,29 @@ var kurrentdb = builder.AddKurrentDB("kurrentdb") var exampleProject = builder.AddProject("apiservice") .WithReference(kurrentdb); -// After adding all resources, run the app... +builder.Build().Run(); ``` + + + +```typescript title="apphost.mts" +import { createBuilder } from './.aspire/modules/aspire.mjs'; + +const builder = await createBuilder(); + +const kurrentdb = await builder.addKurrentDB("kurrentdb"); +await kurrentdb.withDataBindMount("C:\\KurrentDB\\Data"); + +const exampleProject = await builder.addProject("apiservice", "../ExampleProject/ExampleProject.csproj"); +await exampleProject.withReference(kurrentdb); + +await builder.build().run(); +``` + + + + diff --git a/src/frontend/src/content/docs/integrations/databases/meilisearch/meilisearch-connect.mdx b/src/frontend/src/content/docs/integrations/databases/meilisearch/meilisearch-connect.mdx index d03c5affa..1cfc6648f 100644 --- a/src/frontend/src/content/docs/integrations/databases/meilisearch/meilisearch-connect.mdx +++ b/src/frontend/src/content/docs/integrations/databases/meilisearch/meilisearch-connect.mdx @@ -17,6 +17,7 @@ import meilisearchIcon from '@assets/icons/meilisearch-icon.png'; alt="Meilisearch logo" width={100} height={100} + fit="contain" class:list={'float-inline-left icon'} data-zoom-off /> @@ -27,7 +28,7 @@ When you reference a Meilisearch resource from your AppHost, Aspire injects the ## Connection properties -Aspire exposes each property as an environment variable named `[RESOURCE]_[PROPERTY]`. For instance, the `Url` property of a resource called `meilisearch` becomes `MEILISEARCH_URL`. +Aspire exposes each property as an environment variable named `[RESOURCE]_[PROPERTY]`. For instance, the `Uri` property of a resource called `meilisearch` becomes `MEILISEARCH_URI`. The Meilisearch resource exposes the following connection properties: @@ -35,13 +36,13 @@ The Meilisearch resource exposes the following connection properties: | ------------- | ----------- | | `Host` | The hostname or IP address of the Meilisearch server | | `Port` | The port number the Meilisearch server is listening on (default: `7700`) | -| `Url` | The full base URL of the Meilisearch server, with the format `http://{Host}:{Port}` | +| `Uri` | The full base URL of the Meilisearch server, with the format `http://{Host}:{Port}` | | `MasterKey` | The master key used to authenticate with the Meilisearch server | **Example connection values:** ``` -Url: http://localhost:7700 +Uri: http://localhost:7700 MasterKey: p%40ssw0rd1 ``` @@ -144,12 +145,12 @@ Aspire client integrations enable health checks by default. The Meilisearch clie #### Read environment variables in C\# -If you prefer not to use the Aspire client integration, you can read the Aspire-injected connection properties from the environment and construct a `MeilisearchClient` directly using the [📦 Meilisearch.NET](https://www.nuget.org/packages/Meilisearch/) NuGet package: +If you prefer not to use the Aspire client integration, you can read the Aspire-injected connection properties from the environment and construct a `MeilisearchClient` directly using the [📦 MeiliSearch](https://www.nuget.org/packages/MeiliSearch/) NuGet package: ```csharp title="Program.cs" using Meilisearch; -var url = Environment.GetEnvironmentVariable("MEILISEARCH_URL"); +var url = Environment.GetEnvironmentVariable("MEILISEARCH_URI"); var masterKey = Environment.GetEnvironmentVariable("MEILISEARCH_MASTERKEY"); var client = new MeilisearchClient(url!, masterKey); @@ -179,7 +180,7 @@ import ( func main() { // Read the Aspire-injected connection properties client := meilisearch.New( - os.Getenv("MEILISEARCH_URL"), + os.Getenv("MEILISEARCH_URI"), meilisearch.WithAPIKey(os.Getenv("MEILISEARCH_MASTERKEY")), ) @@ -204,7 +205,7 @@ import meilisearch # Read the Aspire-injected connection properties client = meilisearch.Client( - os.getenv("MEILISEARCH_URL"), + os.getenv("MEILISEARCH_URI"), os.getenv("MEILISEARCH_MASTERKEY"), ) @@ -227,7 +228,7 @@ import { MeiliSearch } from 'meilisearch'; // Read Aspire-injected connection properties const client = new MeiliSearch({ - host: process.env.MEILISEARCH_URL!, + host: process.env.MEILISEARCH_URI!, apiKey: process.env.MEILISEARCH_MASTERKEY, }); diff --git a/src/frontend/src/content/docs/integrations/databases/meilisearch/meilisearch-get-started.mdx b/src/frontend/src/content/docs/integrations/databases/meilisearch/meilisearch-get-started.mdx index 19eb2a64a..e6da91770 100644 --- a/src/frontend/src/content/docs/integrations/databases/meilisearch/meilisearch-get-started.mdx +++ b/src/frontend/src/content/docs/integrations/databases/meilisearch/meilisearch-get-started.mdx @@ -15,6 +15,7 @@ import meilisearchIcon from '@assets/icons/meilisearch-icon.png'; alt="Meilisearch logo" width={100} height={100} + fit="contain" class:list={'float-inline-left icon'} data-zoom-off /> diff --git a/src/frontend/src/content/docs/integrations/databases/meilisearch/meilisearch-host.mdx b/src/frontend/src/content/docs/integrations/databases/meilisearch/meilisearch-host.mdx index be838a6cb..620edeb7e 100644 --- a/src/frontend/src/content/docs/integrations/databases/meilisearch/meilisearch-host.mdx +++ b/src/frontend/src/content/docs/integrations/databases/meilisearch/meilisearch-host.mdx @@ -16,6 +16,7 @@ import meilisearchIcon from '@assets/icons/meilisearch-icon.png'; alt="Meilisearch logo" width={100} height={100} + fit="contain" class:list={'float-inline-left icon'} data-zoom-off /> @@ -77,6 +78,9 @@ This updates your `aspire.config.json` with the Meilisearch hosting integration Once you've installed the hosting integration in your AppHost project, you can add a Meilisearch resource as shown in the following example: + + + ```csharp title="AppHost.cs" var builder = DistributedApplication.CreateBuilder(args); @@ -85,12 +89,27 @@ var meilisearch = builder.AddMeilisearch("meilisearch"); var exampleProject = builder.AddProject("apiservice") .WithReference(meilisearch); -// After adding all resources, run the app... +builder.Build().Run(); ``` - + + + +```typescript title="apphost.mts" +import { createBuilder } from './.aspire/modules/aspire.mjs'; + +const builder = await createBuilder(); + +const meilisearch = await builder.addMeilisearch("meilisearch"); + +const exampleProject = await builder.addProject("apiservice", "../ExampleProject/ExampleProject.csproj"); +await exampleProject.withReference(meilisearch); + +await builder.build().run(); +``` + + + @@ -110,6 +129,9 @@ var exampleProject = builder.AddProject("apiservice") To add a data volume to the Meilisearch resource, call the `WithDataVolume` method: + + + ```csharp title="AppHost.cs" var builder = DistributedApplication.CreateBuilder(args); @@ -119,15 +141,38 @@ var meilisearch = builder.AddMeilisearch("meilisearch") var exampleProject = builder.AddProject("apiservice") .WithReference(meilisearch); -// After adding all resources, run the app... +builder.Build().Run(); ``` + + + +```typescript title="apphost.mts" +import { createBuilder } from './.aspire/modules/aspire.mjs'; + +const builder = await createBuilder(); + +const meilisearch = await builder.addMeilisearch("meilisearch"); +await meilisearch.withDataVolume(); + +const exampleProject = await builder.addProject("apiservice", "../ExampleProject/ExampleProject.csproj"); +await exampleProject.withReference(meilisearch); + +await builder.build().run(); +``` + + + + The data volume is used to persist Meilisearch data outside the lifecycle of its container. The data volume is mounted at the `/meili_data` path in the Meilisearch container. When a `name` parameter isn't provided, the name is generated at random. For more information on data volumes and details on why they're preferred over [bind mounts](#add-meilisearch-resource-with-data-bind-mount), see [Docker docs: Volumes](https://docs.docker.com/engine/storage/volumes). ## Add Meilisearch resource with data bind mount To add a data bind mount to the Meilisearch resource, call the `WithDataBindMount` method: + + + ```csharp title="AppHost.cs" var builder = DistributedApplication.CreateBuilder(args); @@ -137,9 +182,29 @@ var meilisearch = builder.AddMeilisearch("meilisearch") var exampleProject = builder.AddProject("apiservice") .WithReference(meilisearch); -// After adding all resources, run the app... +builder.Build().Run(); +``` + + + + +```typescript title="apphost.mts" +import { createBuilder } from './.aspire/modules/aspire.mjs'; + +const builder = await createBuilder(); + +const meilisearch = await builder.addMeilisearch("meilisearch"); +await meilisearch.withDataBindMount("C:\\Meilisearch\\Data"); + +const exampleProject = await builder.addProject("apiservice", "../ExampleProject/ExampleProject.csproj"); +await exampleProject.withReference(meilisearch); + +await builder.build().run(); ``` + + + @@ -150,6 +215,9 @@ Data bind mounts rely on the host machine's filesystem to persist Meilisearch da When you want to explicitly provide the master key used by the container image, you can provide it as a parameter: + + + ```csharp title="AppHost.cs" var builder = DistributedApplication.CreateBuilder(args); @@ -160,9 +228,30 @@ var meilisearch = builder.AddMeilisearch("meilisearch", masterKey); var exampleProject = builder.AddProject("apiservice") .WithReference(meilisearch); -// After adding all resources, run the app... +builder.Build().Run(); ``` + + + +```typescript title="apphost.mts" +import { createBuilder } from './.aspire/modules/aspire.mjs'; + +const builder = await createBuilder(); + +const masterKey = await builder.addParameter("masterKey", { secret: true }); + +const meilisearch = await builder.addMeilisearch("meilisearch", { masterKey }); + +const exampleProject = await builder.addProject("apiservice", "../ExampleProject/ExampleProject.csproj"); +await exampleProject.withReference(meilisearch); + +await builder.build().run(); +``` + + + + When no `masterKey` parameter is provided, Aspire generates a strong master key automatically. ## Connection properties diff --git a/src/frontend/src/content/docs/integrations/databases/ravendb/ravendb-connect.mdx b/src/frontend/src/content/docs/integrations/databases/ravendb/ravendb-connect.mdx index 587341a64..7e3f2b629 100644 --- a/src/frontend/src/content/docs/integrations/databases/ravendb/ravendb-connect.mdx +++ b/src/frontend/src/content/docs/integrations/databases/ravendb/ravendb-connect.mdx @@ -16,6 +16,7 @@ import ravendbIcon from '@assets/icons/ravendb-icon.png'; alt="RavenDB logo" width={100} height={100} + fit="contain" class:list={'float-inline-left icon'} data-zoom-off /> @@ -158,7 +159,8 @@ The connection string is resolved from the `ConnectionStrings` section: "Aspire": { "RavenDB": { "Client": { - "ConnectionString": "URL=http://localhost:8080;Database=ravendb", + "Urls": ["http://localhost:8080"], + "DatabaseName": "ravendb", "DisableHealthChecks": false, "HealthCheckTimeout": 10000, "DisableTracing": false diff --git a/src/frontend/src/content/docs/integrations/databases/ravendb/ravendb-get-started.mdx b/src/frontend/src/content/docs/integrations/databases/ravendb/ravendb-get-started.mdx index 000a839b1..8d48327ad 100644 --- a/src/frontend/src/content/docs/integrations/databases/ravendb/ravendb-get-started.mdx +++ b/src/frontend/src/content/docs/integrations/databases/ravendb/ravendb-get-started.mdx @@ -14,6 +14,7 @@ import ravendbIcon from '@assets/icons/ravendb-icon.png'; alt="RavenDB logo" width={100} height={100} + fit="contain" class:list={'float-inline-left icon'} data-zoom-off /> diff --git a/src/frontend/src/content/docs/integrations/databases/ravendb/ravendb-host.mdx b/src/frontend/src/content/docs/integrations/databases/ravendb/ravendb-host.mdx index d4a729940..53879a4bb 100644 --- a/src/frontend/src/content/docs/integrations/databases/ravendb/ravendb-host.mdx +++ b/src/frontend/src/content/docs/integrations/databases/ravendb/ravendb-host.mdx @@ -16,6 +16,7 @@ import ravendbIcon from '@assets/icons/ravendb-icon.png'; alt="RavenDB logo" width={100} height={100} + fit="contain" class:list={'float-inline-left icon'} data-zoom-off /> @@ -90,7 +91,7 @@ builder.AddProject("apiservice") .WithReference(ravendb) .WaitFor(ravendb); -// After adding all resources, run the app... +builder.Build().Run(); ``` @@ -104,11 +105,11 @@ const builder = await createBuilder(); const ravenServer = await builder.addRavenDB("ravenServer"); const ravendb = await ravenServer.addDatabase("ravendb"); -const apiService = await builder.addProject("apiservice", "../ExampleProject/ExampleProject.csproj") - .withReference(ravendb) - .waitFor(ravendb); +const apiService = await builder.addProject("apiservice", "../ExampleProject/ExampleProject.csproj"); +await apiService.withReference(ravendb); +await apiService.waitFor(ravendb); -// After adding all resources, run the app... +await builder.build().run(); ``` @@ -153,7 +154,7 @@ builder.AddProject("apiservice") .WithReference(ravendb) .WaitFor(ravendb); -// After adding all resources, run the app... +builder.Build().Run(); ``` @@ -167,11 +168,11 @@ const builder = await createBuilder(); const ravenServer = await builder.addRavenDB("ravenServer"); const ravendb = await ravenServer.addDatabase("ravendb", { ensureCreated: true }); -const apiService = await builder.addProject("apiservice", "../ExampleProject/ExampleProject.csproj") - .withReference(ravendb) - .waitFor(ravendb); +const apiService = await builder.addProject("apiservice", "../ExampleProject/ExampleProject.csproj"); +await apiService.withReference(ravendb); +await apiService.waitFor(ravendb); -// After adding all resources, run the app... +await builder.build().run(); ``` @@ -196,7 +197,7 @@ builder.AddProject("apiservice") .WithReference(ravendb) .WaitFor(ravendb); -// After adding all resources, run the app... +builder.Build().Run(); ``` @@ -207,16 +208,16 @@ import { createBuilder } from './.aspire/modules/aspire.mjs'; const builder = await createBuilder(); -const ravenServer = await builder.addRavenDB("ravenServer") - .withDataVolume(); +const ravenServer = await builder.addRavenDB("ravenServer"); +await ravenServer.withDataVolume(); const ravendb = await ravenServer.addDatabase("ravendb"); -const apiService = await builder.addProject("apiservice", "../ExampleProject/ExampleProject.csproj") - .withReference(ravendb) - .waitFor(ravendb); +const apiService = await builder.addProject("apiservice", "../ExampleProject/ExampleProject.csproj"); +await apiService.withReference(ravendb); +await apiService.waitFor(ravendb); -// After adding all resources, run the app... +await builder.build().run(); ``` @@ -243,7 +244,7 @@ builder.AddProject("apiservice") .WithReference(ravendb) .WaitFor(ravendb); -// After adding all resources, run the app... +builder.Build().Run(); ``` @@ -254,22 +255,22 @@ import { createBuilder } from './.aspire/modules/aspire.mjs'; const builder = await createBuilder(); -const ravenServer = await builder.addRavenDB("ravenServer") - .withDataBindMount("C:\\RavenDb\\Data"); +const ravenServer = await builder.addRavenDB("ravenServer"); +await ravenServer.withDataBindMount("C:\\RavenDb\\Data"); const ravendb = await ravenServer.addDatabase("ravendb"); -const apiService = await builder.addProject("apiservice", "../ExampleProject/ExampleProject.csproj") - .withReference(ravendb) - .waitFor(ravendb); +const apiService = await builder.addProject("apiservice", "../ExampleProject/ExampleProject.csproj"); +await apiService.withReference(ravendb); +await apiService.waitFor(ravendb); -// After adding all resources, run the app... +await builder.build().run(); ``` -Data bind mounts rely on the host machine's filesystem to persist the RavenDB data across container restarts. The data bind mount is mounted at the `C:\RavenDb\Data` on Windows (or the equivalent Unix path) on the host machine in the RavenDB container. For more information on data bind mounts, see [Docker docs: Bind mounts](https://docs.docker.com/engine/storage/bind-mounts). +Data bind mounts rely on the host machine's filesystem to persist the RavenDB data across container restarts. The bind mount maps the host path `C:\RavenDb\Data` (on Windows, or the equivalent Unix path) to the `/var/lib/ravendb/data` directory inside the RavenDB container. For more information on data bind mounts, see [Docker docs: Bind mounts](https://docs.docker.com/engine/storage/bind-mounts).