coreapp.toml's [postgres] or [mysql] min_version: the installer compares it with the Core's PostgreSQL or MariaDB on install and update, and refuses an older Core with both versions, instead of the app failing later. coreapp core reads the versions the same way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
65 lines
2.8 KiB
Markdown
65 lines
2.8 KiB
Markdown
# {{TITLE}}
|
|
|
|
An app for Federated Core, made with
|
|
[coreapp-dev](https://gitea.federated.computer/Federated_Computer/coreapp-dev).
|
|
|
|
## Develop
|
|
|
|
Change the app (`Dockerfile`, `www/`), then, in this folder:
|
|
|
|
```
|
|
coreapp deploy # build the image, copy it to the Core in your VM, install or update
|
|
coreapp check # https://{{NAME}}.<domain>/ answers, with a valid certificate
|
|
coreapp logs -f # its log
|
|
coreapp status # its container, address and URL
|
|
coreapp shell # a shell in its container
|
|
coreapp signin # sign in with the Core's test account (apps with "sso")
|
|
coreapp remove # uninstall it from the Core
|
|
```
|
|
|
|
## Files
|
|
|
|
| File | What it is |
|
|
|---|---|
|
|
| `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 square PNG, 256x256 is good, up to 1 MB. This one is a placeholder |
|
|
|
|
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.
|
|
|
|
## What the app gets
|
|
|
|
Its environment (the `.env` file on the Core, made once at install; updates
|
|
keep its values and add new ones):
|
|
|
|
| Variable | Value |
|
|
|---|---|
|
|
| `APP_URL` | `https://{{NAME}}.<domain>` |
|
|
| `APP_SECRET` | A random secret, for signing cookies and such |
|
|
| `IMAGE_VERSION` | The version that's installed |
|
|
| `CORE_DOMAIN` | The Core's domain (set only on a Core) |
|
|
| `CORE_PROXY` | traefik's address, the proxy in front of the app (trust its `X-Forwarded-*`) |
|
|
| `CORE_ADMIN_EMAIL` | `admin@<domain>`, the Core's admin account: always an admin of the app, when it signs in with the Core |
|
|
|
|
`needs = ["postgres"]` adds `DB_HOST`, `DB_PORT`, `DB_NAME`, `DB_USER` and
|
|
`DB_PASSWORD` (`needs = ["mysql"]` the same, for MariaDB; PostgreSQL
|
|
extensions only a superuser can make, like vector, go in `coreapp.toml`'s
|
|
`[postgres] extensions`, and the oldest server version it works with in
|
|
`min_version`); `needs = ["sso"]` adds `OIDC_ISSUER`, `OIDC_CLIENT_ID` and
|
|
`OIDC_CLIENT_SECRET` (the client's callback, PKCE and secret method are in
|
|
`coreapp.toml`'s `[sso]`); `needs = ["email"]` adds `SMTP_HOST`, `SMTP_PORT`
|
|
(587), `SMTP_SECURITY` (`starttls`), `SMTP_USER`, `SMTP_PASSWORD` and
|
|
`SMTP_FROM` (`{{NAME}}@<domain>`): the app's own account on the Core's mail
|
|
server, for sending.
|
|
|
|
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.
|