Apps are a coreapp.toml; a trusted installer makes the Core side

An app's repository now has only coreapp.toml, its Dockerfile, its code
and an icon: no install scripts or compose file, so installing an app
from someone else's repository can't run their code as root on a Core.

core/coreapps runs on the Core (coreapp deploy puts it in /opt/coreapps).
It checks the manifest, refuses Federated's app names and the Core's
hostnames, picks a free address on that Core, writes the generic app
format from its own templates, sets up the needs (postgres, sso) and
installs through installapp. Updates keep the address, secrets and data,
add settings for new needs and delete old images; dropping a need is
refused. remove rebuilds Superpanel's catalog afterwards.

PLAN.md: the Coreapps direction and steps, and what the Core offers apps
(Superpanel's AI features, mcpserver, hermes, email, PowerDNS).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 13:36:47 -07:00
co-authored by Claude Opus 5.5
parent d8c6d1011f
commit b4d47fb1c5
36 changed files with 1046 additions and 413 deletions
+27 -19
View File
@@ -18,28 +18,36 @@ coreapp remove # uninstall it from the Core
## Files
The app is in the format Federated Core installs apps from
(`/federated/services/{{NAME}}/` on the Core):
| File | What it is |
|---|---|
| `service` | Name, description, image (`CONTAINER`), `VERSION`, `INTERNAL_IP`, apps it needs (`DEPENDS`, e.g. `postgresql`), and how to check it's up (`MONITOR`) |
| `docker-compose.yml.in` | The container(s), on the Core's `core` network at `INTERNAL_IP`, with the traefik labels that give it `https://{{NAME}}.<domain>` |
| `env.in` | Its settings, as the `.env` file next to the compose file |
| `install` | Run by the Core's `installapp`; fills in the templates |
| `icon.png` | Its icon in the Core's dashboard |
| `Dockerfile`, `www/` | The app itself (not copied to the Core) |
| `coreapp.toml` | What the Core needs to know: name, title, image and version, port, health path, and what it needs from the Core (`needs`) |
| `Dockerfile`, `www/` | The app itself |
| `icon.png` | Its icon in the Core's dashboard (a PNG, up to 1 MB) |
In `docker-compose.yml.in` and `env.in`, the Core replaces, once at install:
That's all an app has. The Core's side (the container on the Core's `core`
network, the traefik route to `https://{{NAME}}.<domain>`, its settings and
secrets, its database or sign-in client) is made by coreapp-dev's installer,
`coreapps`, from `coreapp.toml`. The app can't run scripts on the Core.
- `@DOMAIN@`: the Core's domain, and any other variable in `/etc/federated`
- `@VERSION@`, `@CONTAINER@`, `@INTERNAL_IP@`: from `service`
- `@SECRET:RANDOM:LLLLLLLL@`: a random value (`L` a letter or digit, `a`
lowercase, `A` uppercase, `0` a digit, `x` hex), also available as
`@SECRET@` further down
## What the app gets
`${...}` is left for Docker Compose, which reads it from `.env`.
Its environment (the `.env` file on the Core, made once at install; updates
keep its values and add new ones):
Raise `VERSION` in `service` for each release. The Core's nightly upgrade
only redeploys an app when `VERSION` differs from `IMAGE_VERSION` in its
`.env`.
| Variable | Value |
|---|---|
| `APP_URL` | `https://{{NAME}}.<domain>` |
| `APP_SECRET` | A random secret, for signing cookies and such |
| `IMAGE_VERSION` | The version that's installed |
`needs = ["postgres"]` adds `DB_HOST`, `DB_PORT`, `DB_NAME`, `DB_USER` and
`DB_PASSWORD`; `needs = ["sso"]` adds `OIDC_ISSUER`, `OIDC_CLIENT_ID` and
`OIDC_CLIENT_SECRET`.
Its files: `/data` in the container is kept on the Core
(`/federated/apps/{{NAME}}/data`) across updates and restarts.
The app serves plain HTTP on its `port`; traefik on the Core handles HTTPS
and the certificate.
Raise `version` in `coreapp.toml` for each release.