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
+35 -14
View File
@@ -50,29 +50,47 @@ coreapp deploy # build, copy to the Core, install (or update)
coreapp check # https://my-app.<domain>/ answers, valid certificate
```
An app is a folder in the format Federated Core installs apps from
(`/federated/services/<app>/` on the Core): `service`,
`docker-compose.yml.in`, `env.in`, `install`, `uninstall`, `icon.png`, plus
the app's own `Dockerfile`. The README in each new app explains the files.
An app is a folder (its own git repository) with a `coreapp.toml`, a
`Dockerfile`, the app's code and an `icon.png`:
```toml
name = "my-app" # https://my-app.<domain>
title = "My App"
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
```
The app has no scripts or compose file: the Core side is made by
coreapp-dev's installer, `coreapps` (`core/` here, `/opt/coreapps` on the
Core). It checks `coreapp.toml`, picks a free address on that Core, writes
the app in the Core's generic format (`/federated/services/<name>/`), and
sets up what it needs: the traefik route and certificate, its settings and
secrets, its database, its Authelia client. So what an app can do on a Core
is decided by the installer, not by whoever wrote the app. The README in
each new app explains the files and the settings it gets.
| Command | Does |
|---|---|
| `coreapp new <name>` | Make an app in `./<name>`; it gets an address in 192.168.200.x on the Core |
| `coreapp new <name>` | Make an app in `./<name>` |
| `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 deploy` | Build its image, copy it to the Core over SSH, install it, or update it keeping its `.env` |
| `coreapp check` | It answers at its `MONITOR` URL with a valid certificate |
| `coreapp deploy` | Build its image, copy it to the Core over SSH, install it, or update it keeping its settings and data |
| `coreapp check` | It answers at `https://<name>.<domain><health>` with a valid certificate |
| `coreapp status` / `logs [-f]` / `shell` | Its container, its log, a shell in it |
| `coreapp remove` | Uninstall it from the Core (asks first) |
| `coreapp list` | The apps on the Core installed this way |
| `coreapp remove` | Uninstall it from the Core, with its database and sign-in client (asks first) |
`COREAPP_VM` picks the VM (default `coreserver`).
Installing and removing an app go through the Core's own `installapp` and
`uninstallapp`. Those would also add its `MONITOR` URL to Federated's
external monitoring, so `coreapp deploy` copies `service` to the Core without
the `MONITOR` line: apps in development aren't monitored. `coreapp check`
uses the line from your folder.
Installing and removing go through the Core's own `installapp` and
`uninstallapp`, so the app shows up in Superpanel. The installer gives apps
no `MONITOR` line, so they aren't added to Federated's external monitoring.
The Core's scripts print secrets in their traces; their output is kept in
`/federated/logs/coreapps/` on the Core.
## VM commands
@@ -110,8 +128,11 @@ stay installed.
| `libvirt/network-hook.sh` | NAT and firewall rules for the `coreapp` network |
| `bin/coreapp-vm` | Creates and manages CoreServer VMs (`coreapp-vm help`) |
| `bin/coreapp` | Makes, deploys and tests apps (`coreapp help`) |
| `core/coreapps` | The installer that runs on the Core (`coreapps help`) |
| `core/templates/` | The Core's generic app files it makes from `coreapp.toml` |
| `core/needs/<need>/` | What each need adds: `env.in` (settings), `setup` and `teardown` (run on the Core), `depends` (the Core app it uses), `compose` (added to the container) |
| `templates/app/` | What `coreapp new` starts from |
| `templates/postgres/`, `templates/sso/` | Laid over it by `--postgres` / `--sso`: their files replace the base's; `*.append` files are added to the base file, `.remove` lists base files to drop, `.depends` the Core apps it needs (merged into `DEPENDS`) |
| `templates/postgres/`, `templates/sso/` | Example apps laid over it by `--postgres` / `--sso`: their files replace the base's; `*.append` files are added to the base file, `.remove` lists base files to drop, `.needs` goes into `needs` |
| `templates/postgres-sso/` | The example app when both are used |
| `uninstall.sh` | Removes what coreapp-dev set up |
| [PLAN.md](PLAN.md), [TEST.md](TEST.md) | What's next, and how to test it |