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
+9 -4
View File
@@ -100,8 +100,9 @@ that are read by shell and YAML:
listens on; for a new app, 8080. It's only reachable inside the Core.
- `health`: a path starting with `/`. Deploy asks for it on the app's
address with the app's host name (`Host: <name>.<domain>`,
`X-Forwarded-Proto: https`, as traefik sends), and waits until it answers
with any status below 500 (so `/` is fine for an app without a health
`X-Forwarded-Proto: https`, as traefik sends), and waits (up to 5
minutes, showing the app's last log line every 30 seconds) until it
answers with any status below 500 (so `/` is fine for an app without a health
endpoint, even if it redirects to a sign-in page); `coreapp check` wants a
2xx there, so prefer a path that returns 200 without signing in.
- Unknown settings are refused, so a typo doesn't go unnoticed.
@@ -122,7 +123,7 @@ install it (with both versions in the message) instead of breaking later:
```toml
[postgres]
min_version = "16" # or [mysql] min_version = "11.4" (MariaDB's numbering)
min_version = "16" # up to three parts; or [mysql] min_version = "10.6.2" (MariaDB's numbering)
```
Use what the app's docs or code require, not just today's version.
@@ -299,7 +300,11 @@ If the app can't work without one of these, say so plainly in your report
rather than working around it; the gap is useful to know. The same goes for
a need that doesn't fit the app (e.g. a sign-in `[sso]` can't describe):
report it rather than writing a proxy, bridge or second service into the
app's container. If it's optional
app's container. That includes an app with no OpenID Connect sign-in
(only passwords, LDAP, SAML or a fixed provider such as Google): writing
new sign-in code into it is out of scope, so leave `sso` off and report
it. A generic OAuth2 or OIDC provider setting the app already has is fine
to point at Authelia. If it's optional
(e.g. email notifications), leave it off and note it.
## Workflow
+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