Commit Graph
2 Commits
Author SHA1 Message Date
casjay ac3c9b5e57 📖 Replace runbook AI.md with standardized app master spec 📖
AI.md is now the standardized application-image specification from
claudemgr/docker/CASJAYSDEVDOCKER.md — PARTs 0–8 covering critical
rules and org mapping, repo model, template system with the OCI label
canon (image.url https://hub.docker.com/r/casjaysdevdocker/opengist),
tooling reference, .env.scripts, runtime system, README layout with the
hand-crafted README exception, CI/CD, and verification gates. The old
file's bootstrap/update runbook moved to the dockersrc-bootstrap agent;
the spec stays declarative.

- AI.md: replaced with the CASJAYSDEVDOCKER.md master template
2026-08-14 15:21:33 -04:00
casjay b016f1db1d 🐛 Fix container restart loop from set -e propagation 🐛
Root cause: many functions in functions/entrypoint.sh ended with a bare,
unguarded `[ "$DEBUGGER" = "on" ] && echo/printf/__service_banner ...`
statement as their last executed line. With DEBUGGER unset (the default
runtime case), the `[ ]` test is false, so the function's implicit
return value is nonzero. Several of these functions (most critically
__symlink, called bare from __setup_mta) are invoked as unguarded
statements from other functions, and the whole entrypoint runs under
`set -eo pipefail`, so the nonzero return aborted the entire script
chain immediately after startup — explaining why the container only
printed the first log line and exited 1, and why it only worked with
DEBUGGER=on (which makes the echo run and return 0, masking the bug).

Verified via two clean docker buildx build + run cycles: before the
fix, `docker inspect` showed the container crash-looping (exit 1,
~3.9s uptime); after, `RestartCount=0 Status=running Health=healthy`
with opengist fully started, DEBUGGER unset.

- rootfs/usr/local/etc/docker/functions/entrypoint.sh: append `|| true`
  to all 26 bare `[ "$DEBUGGER" = "on" ] && ...` statements so their
  result never propagates as the enclosing function's return value
- TODO.AI.md: log 20 pre-existing script-lint findings on the same
  file (missing `--` on grep, missing `local` on a few function-local
  vars, missing VERSION= line) found incidentally while diagnosing
  this bug; deferred as unrelated cleanup, not part of this fix
2026-08-03 09:41:46 -04:00