Get started with the Umami integration
Это содержимое пока не доступно на вашем языке.
Umami is a self-hosted web analytics platform. The Aspire Community Toolkit integration adds an Umami container to your AppHost and configures it to use an Aspire PostgreSQL database.
Why use Umami with Aspire
Section titled “Why use Umami with Aspire”The hosting integration:
- Models Umami and its PostgreSQL database as AppHost resources.
- Configures Umami’s database URL and waits for the database before starting Umami.
- Creates a secret parameter for Umami when you don’t provide one.
- Adds an HTTP health check for Umami.
How the integration fits together
Section titled “How the integration fits together”The hosting package runs Umami alongside PostgreSQL. Open Umami’s HTTP endpoint from the Aspire dashboard to use its web interface.
architecture-beta group apphost(server)[AppHost] service hosting(server)[Umami integration] in apphost service umami(server)[Umami] in apphost service postgres(database)[PostgreSQL] in apphost hosting:R --> L:umami postgres:R --> L:umami
Prerequisites
Section titled “Prerequisites”- Install the Aspire CLI and create an AppHost.
- Install and run Docker, which Aspire uses to start the Umami and PostgreSQL containers.
- Add the Umami hosting package to the AppHost.
Run Umami in the AppHost
Section titled “Run Umami in the AppHost”Add a PostgreSQL database and configure Umami to use it:
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const postgres = await builder.addPostgres('postgres');const database = await postgres.addDatabase('umami-db');
const umami = await builder.addUmami('umami');await umami.withPostgreSQL(database);
await builder.build().run();var builder = DistributedApplication.CreateBuilder(args);
var postgres = builder.AddPostgres("postgres");var database = postgres.AddDatabase("umami-db");
var umami = builder.AddUmami("umami") .WithPostgreSQL(database);
// After adding all resources, run the app...builder.Build().Run();The integration creates an Umami resource using the umamisoftware/umami:3.4 container image. Aspire exposes its HTTP endpoint in the dashboard. For package installation, resource options, and health-check behavior, see Set up Umami in the AppHost.