Add the email need: each app gets its own sending-only mail account

needs = ["email"] (coreapp new --email) makes an LDAP account
coreapp-<name> (not a person, no mailbox) and adds SMTP_* settings.
Teardown removes it only if it's the app's; the installer warns about
an entry it left alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 15:01:11 -07:00
co-authored by Claude Opus 5.5
parent bef3b86970
commit 6ab1db839b
12 changed files with 173 additions and 13 deletions
+2 -1
View File
@@ -61,7 +61,7 @@ image = "localhost/coreapp/my-app" # where the Core gets the image
version = "0.1.0"
port = 8080 # the port it serves HTTP on
health = "/" # a path that answers when it's up
needs = ["postgres", "sso"] # its own database; sign-in with Core accounts
needs = ["postgres", "sso"] # its own database; sign-in with Core accounts; "email": sending mail
```
The app has no scripts or compose file: the Core side is made by
@@ -79,6 +79,7 @@ each new app explains the files and the settings it gets.
| `coreapp new --postgres <name>` | The same, with its own database on the Core's PostgreSQL (a Python example app that uses it) |
| `coreapp new --sso <name>` | The same, with sign-in through the Core's Authelia (OpenID Connect; a Python example app) |
| `coreapp new --postgres --sso <name>` | Both: a database and sign-in (the example counts each person's visits) |
| `coreapp new --email <name>` | (With any of the above.) Sending mail through the Core's mail server, with the app's own account |
| `coreapp deploy [--recreate]` | Build its image, copy it to the Core over SSH, install it, or update it keeping its settings and data (`--recreate`: a fresh container even if nothing changed) |
| `coreapp check` | It answers at `https://<name>.<domain><health>` with a valid certificate |
| `coreapp status` / `logs [-f]` / `shell [command]` | Its container, its log, a shell in it (or one command, without a terminal) |