Let an installed app drop a need
Taking sso or email out of needs removes the client or mail account once the new version answers; postgres or mysql need --drop-database (coreapp deploy asks for the app's name). Their settings leave .env first, so a postgres -> mysql switch gets mysql's own values; a failed update rolls back with them intact. The route wait now compares traefik's answer with the app's own, so an app's 404 isn't taken for a missing route. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -234,7 +234,28 @@ The Core's own scripts trace secrets, so their output goes to
|
||||
(change `image`, and skip coreapp's build by running
|
||||
`coreapp-vm ssh /opt/coreapps/coreapps install <dir>` on a copy)
|
||||
- with the app installed with `needs = ["postgres"]`, deploying with
|
||||
`needs = []` ("drops needs postgres")
|
||||
`needs = []` without `--drop-database` ("drops postgres: that deletes
|
||||
...'s database ... add --drop-database"); with it, typing another name
|
||||
at the question: "Not deployed; nothing changed."
|
||||
8a. Dropping needs (an app from `coreapp new --postgres --sso --email`,
|
||||
then given the template's static `Dockerfile` and `www/`, which need
|
||||
nothing):
|
||||
- `needs = ["postgres"]`, deploy: "no longer needs: sso email", then,
|
||||
after the app answers, "Removing what it no longer needs from the
|
||||
Core: sso, email..."; the Authelia block and the client's copy are
|
||||
gone, Authelia healthy after its restart, the LDAP mail account gone,
|
||||
no `OIDC_*` or `SMTP_*` in `.env`, the database kept.
|
||||
- With the example's own code (which needs `OIDC_*`): the new version
|
||||
doesn't start and the update rolls back; the needs, settings, client
|
||||
and mail account are all still there.
|
||||
- `needs = ["mysql"]`, `coreapp deploy --drop-database`, typing the name,
|
||||
with a Dockerfile whose container exits: rolled back, the PostgreSQL
|
||||
database still there. With the working Dockerfile: the PostgreSQL
|
||||
database and user are gone, `.env` has `DB_HOST=pdnsmysql.<domain>`
|
||||
and a new `DB_PASSWORD` that logs in to MariaDB.
|
||||
- After a deploy whose health path answers 404 from the app itself, no
|
||||
"traefik doesn't route" note (deploy compares traefik's answer with
|
||||
the app's own).
|
||||
9. `/data` is writable by the app: with an image that runs as `nobody`
|
||||
(the `--postgres`/`--sso` examples), `coreapp shell` then
|
||||
`touch /data/x` works; on the Core, `/federated/apps/<name>/data` belongs
|
||||
|
||||
Reference in New Issue
Block a user