Skip to content

Add Posta hosting integration#1461

Open
axies20 wants to merge 26 commits into
CommunityToolkit:mainfrom
axies20:Posta
Open

Add Posta hosting integration#1461
axies20 wants to merge 26 commits into
CommunityToolkit:mainfrom
axies20:Posta

Conversation

@axies20

@axies20 axies20 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Adds a new CommunityToolkit.Aspire.Hosting.Posta hosting integration for Posta, a self-
hosted email delivery platform.

This PR adds:

  • PostaResource with connection properties for the Posta HTTP API/dashboard
  • AddPosta(...) for adding the Posta container resource
  • WithReference(...) support for connecting Posta to PostgreSQL and Redis resources
  • PostaOptions for configuring Posta environment variables, including web URLs, rate limits, OAuth, blob storage,
    SMTP, inbound email, email verification, metrics, and advanced switches
  • Aspire parameter support for secrets such as JWT secret, admin password, SMTP password, OAuth client secret, S3
    keys, encryption key, inbound webhook secret, PostgreSQL URL, and Redis password
  • HTTP health checks for /healthz and /readyz
  • an example AppHost under examples/posta
  • README documentation for the integration
  • unit tests and an AppHost smoke test

The container image is pinned to jkaninda/posta:0.11.0.

PR Checklist

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • PR doesn't include merge commits (always rebase on top of our main, if needed)
  • New integration
    • Docs are written
    • Added description of major feature to project description for NuGet package (4000 total character limit, so
      don't push entire description over that)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Contains NO breaking changes
  • Every new API (including internal ones) has full XML docs
  • Code follows all style conventions

Other information

Validated locally with:

dotnet build tests/CommunityToolkit.Aspire.Hosting.Posta.Tests/CommunityToolkit.Aspire.Hosting.Posta.Tests.csproj
--no-restore
dotnet test tests/CommunityToolkit.Aspire.Hosting.Posta.Tests/CommunityToolkit.Aspire.Hosting.Posta.Tests.csproj --no-
build

Test result: 9 passed, 0 failed.

axies20 added 2 commits July 8, 2026 14:01
- Introduced `CommunityToolkit.Aspire.Hosting.Posta` project for integrating Posta with PostgreSQL and Redis.
- Added extension methods for configuring Posta containers, health checks, and resource dependencies.
- Created test projects for validating Posta container configuration and health checks.
- Added example projects under `examples/posta` showcasing Posta integration with PostgreSQL and Redis.
- Updated solution file and package references to include the new Posta project.
- Introduced `CommunityToolkit.Aspire.Hosting.Posta` project for integrating Posta as a containerized resource.
- Added extension methods for configuring Posta containers, including support for PostgreSQL, Redis, and advanced environment options.
- Defined Posta resource options, container image tags, and health check configurations.
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.sh | bash -s -- 1461

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/CommunityToolkit/Aspire/main/eng/scripts/dogfood-pr.ps1) } 1461"

axies20 added 24 commits July 8, 2026 14:06
…ources to `AddPosta`. Refine README to reflect updated API and usage.
…nces

- Introduced tests to validate `AddPosta` behavior with null database and Redis inputs, ensuring proper exception handling.
- Added test to confirm PostgreSQL and Redis configuration via environment variables.
…dPosta` methods. Extend methods to support chained references.
… Remove redundant overloads in `PostaHostingExtensions`.
…d `RedisAddress`; refine README to clarify environment configuration usage.
…ble assignments with `Set` and `SetIfNotNull` methods for improved readability and consistency.
…tion values, ensuring flexibility and enhanced security.
… and improve environment variable assertions.
…ve method null-checks and chaining logic.
…up by replacing `SetIfNotNull` with `SetParameter`, adding default values, and introducing `SetIfAbsent` to prevent overwrites.
… resource builders for improved flexibility and configurability.
- Introduced `PostaEmailVerificationOptions`, `PostaGoogleOAuthOptions`, `PostaInboundSmtpOptions`, `PostaS3BlobStorageOptions`, and `PostaSystemSmtpOptions` for parameterized configuration.
- Added `PostaEnvironmentVariables` to define constants for environment variable keys.
- Created `launchSettings.json` example for local hosting configuration.
…tion, enhance environment variable assertions, and streamline option setup.
…, improve secret handling, and streamline examples.
…constants, improve environment variable handling, and modularize configuration setup.
…types, add defaults, and improve XML summaries for configuration properties.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant