CommunityToolkit / CommunityToolkit/Aspire
MailPit scale to zero
- Dominant language
- C#
- Stars
- 627
- Forks
- 196
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 35
Description
### Related to an existing integration?
Yes
### Existing integration
MailPit
### Overview
Currently all my dev/test environments running on Azure Container Apps with scale to zero. Since adding MailPit, it has dominated my costs. It would be great MailPit would scale to zero too.
### Usage example
**Option A**
``` csharp
// No API, it's by default <3
```
**Option B**
``` csharp
.AddMailPit()
.WithDataVolume()
.WithScaleToZero()
// needs some more thought
```
### Breaking change?
I'm not sure
### Alternatives
1. Do nothing: just pay the cost.
2. Set up scale rules in apphost logic.
### Additional context
As far as I can tell this should be possible with [TCP Scale Rules](https://learn.microsoft.com/azure/container-apps/scale-app?pivots=container-apps-bicep#tcp). I thought this was a KEDA thing but maybe it's Azure Container Apps specific :(.
Another wrinkle might be that persistent storage is not enabled by default, without which every scale operation loses all the emails.
### Help us help you
Yes, but only if others can assist
Contributor guide
Research direction
Start by reviewing the existing MailPit integration and the Azure Container Apps TCP Scale Rules documentation linked in the issue. Clarify how scale-to-zero should be exposed, whether persistent storage is required, and what behavior should be considered complete; ask for guidance before choosing between the proposed options.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp
- Domain
- cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100