Snipe-IT rehearsal: slow starts, image volumes, HTML-as-text mail

Deploy waits up to 5 minutes for an app to answer, printing its last log
line every 30 s, and stops early when the container exits or restarts
three times. It notes VOLUMEs the image declares outside /data, and
uninstall removes anonymous volumes (down -v). coreapp inbox renders HTML
sent in a text/plain part.

Skill: no first-come setup wizard even without sso (admin at startup,
password by reset), no new sign-in code for apps without OIDC, upstream
scripts that read shell variables, a step between upstream steps, the
image's VOLUMEs, a slow first install, three-part min_version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-04 13:12:46 -07:00
co-authored by Claude Opus 5.5
parent f4b869decd
commit 114b364cef
7 changed files with 112 additions and 15 deletions
+24 -1
View File
@@ -43,7 +43,18 @@ SKILL.md), and make the Dockerfile fit the Core:
Before writing the entrypoint, look at how the upstream image starts
(`docker inspect -f '{{json .Config.Entrypoint}} {{json .Config.Cmd}}'
<image>`): end yours by running what it ran (`exec` its entrypoint with
`"$@"`, or `exec "$@"` when it only has a `CMD`).
`"$@"`, or `exec "$@"` when it only has a `CMD`). Read the upstream
script: it may read settings from its own shell (`$SESSION_DRIVER`),
not from the app's config, so export those in yours. If you need a step
between its steps (after its migrations, before the server starts), run
its migration command yourself in your entrypoint, then your step, then
`exec` it (migrations are safe to run twice); editing the upstream
script with `sed` is the last resort, since it breaks silently when the
image changes.
- **The image's `VOLUME`s** (`docker inspect -f '{{json .Config.Volumes}}'
<image>`): Docker gives each its own anonymous volume, which isn't
`/data` (not kept for a rollback, gone with the container). Point what
the app keeps there at `/data`; deploy warns about any it finds.
- **Settings the app keeps in its database** (many apps store the base
URL, SMTP server or OIDC client in a settings table, edited in their
admin pages, and that table wins over environment variables): write the
@@ -112,6 +123,18 @@ SKILL.md), and make the Dockerfile fit the Core:
Keep the app's other files as they are; add `.dockerignore` entries for
`coreapp.toml`, `icon.png` and `.git` so they don't bust the build cache.
**First-run setup without `sso`.** The "no first-come owner" rule holds
for every app: if the app has a setup wizard where whoever arrives first
becomes the admin, skip it on a Core. Make `CORE_ADMIN_EMAIL` the admin at
startup with a password nobody knows, and give the app `email` so that
account sets its own password with the app's password reset; say so in
your report.
**A slow first start.** Deploy waits up to 5 minutes for the app to
answer. If its first install takes longer (hundreds of migrations), deploy
says it's installed but not working; check `coreapp logs`, and once it's
done, deploy again (it's an update then, and waits again).
If the app documents a minimum database version, set `[postgres]` or
`[mysql]` `min_version` to it, even when today's Core is far newer: it
keeps the app from installing on an older Core later.
+1 -1
View File
@@ -60,7 +60,7 @@ standard-library Python example of the whole flow (`oidc.py`).
has none of them, so an app that reads the person only from the ID token
gets no email or name: turn on its "use userinfo" setting. Requesting
fewer scopes doesn't help (without `openid`, userinfo answers 403). If
the app has no such setting, a small patch to its OIDC code that fills
the app has no such setting, a small patch to its existing OIDC code that fills
missing claims from userinfo (when its `sub` matches the ID token's) is
fine: keep it as a patch file applied in the Dockerfile, say why in a
comment, and name it in your report, since it's the app's own code. (The