Add the mysql need: its own database on the Core's MariaDB

needs = ["mysql"] (coreapp new --mysql) makes a user and database
coreapp_<name> on pdnsmysql, with the same DB_* settings as postgres
(so an app has one or the other). Root's password is read inside the
container, so it stays out of installapp's set -x log.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 15:15:23 -07:00
co-authored by Claude Opus 5.5
parent 6ab1db839b
commit 8ef2112e3c
12 changed files with 93 additions and 14 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; "email": sending mail
needs = ["postgres", "sso"] # its own database ("mysql" for MariaDB); 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 --mysql <name>` | (Instead of `--postgres`, with no example app.) Its own database on the Core's MariaDB |
| `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 |