Confirmed the hard way, live in production: Docker Compose only
recreates a container when its own service definition changes (image,
env, labels...), never from a bind-mounted file's content changing on
disk by itself. marketing's service definition never changes between
deploys, so Dokploy's AutoDeploy -- which wipes and re-clones the whole
git checkout, including bettersightbox-index.html, on every push -- had
never once recreated that container. It kept serving a September-dated,
weeks-stale copy of the page indefinitely, orphaned from the fresh file
sitting right next to it on disk, through every single deploy since
Stage 1.
generate-dokploy-compose.sh now computes a real sha256-based hash of
bettersightbox-index.html and bakes it into the marketing service as a
literal content-hash label -- the one value in the whole generated file
that's deliberately NOT left as a live ${VAR} reference, since its only
job is to actually change when the file's content changes, giving
Compose's own diffing a real reason to recreate the container. Local
dev (where this bug doesn't apply, no AutoDeploy wipe-and-reclone cycle)
keeps the ${MARKETING_HTML_HASH:-dev} default.
Documented in CLAUDE.md and CICD_PLAYBOOK.md: regenerate
docker-compose.dokploy.yml any time bettersightbox-index.html changes,
not just when docker-compose.yml itself changes -- skipping it silently
leaves the marketing page stale with no error anywhere.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012pc2x7vyuUofdT3kLuqF3Y