coreapp new --postgres: apps with their own database
A template overlay (templates/postgres) adds DEPENDS="postgresql", DB_* settings with a random password, an install that creates the user and database on the Core's PostgreSQL (safe to re-run), an uninstall that drops them, and a Python example that counts visits. Tested with a throwaway app: deploy, redeploy and a reboot of the Core keep the data, remove drops the database and user. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -58,6 +58,7 @@ the app's own `Dockerfile`. The README in each new app explains the files.
|
||||
| Command | Does |
|
||||
|---|---|
|
||||
| `coreapp new <name>` | Make an app in `./<name>`; it gets an address in 192.168.200.x on the Core |
|
||||
| `coreapp new --postgres <name>` | The same, with its own database on the Core's PostgreSQL (a Python example app that uses it) |
|
||||
| `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 status` / `logs [-f]` / `shell` | Its container, its log, a shell in it |
|
||||
@@ -108,5 +109,6 @@ stay installed.
|
||||
| `bin/coreapp-vm` | Creates and manages CoreServer VMs (`coreapp-vm help`) |
|
||||
| `bin/coreapp` | Makes, deploys and tests apps (`coreapp help`) |
|
||||
| `templates/app/` | What `coreapp new` starts from |
|
||||
| `templates/postgres/` | Laid over it by `--postgres` (`*.append` files are added to the base file; `.remove` lists base files to drop) |
|
||||
| `uninstall.sh` | Removes what coreapp-dev set up |
|
||||
| [PLAN.md](PLAN.md), [TEST.md](TEST.md) | What's next, and how to test it |
|
||||
|
||||
Reference in New Issue
Block a user