Skip to content

Add init: true convention to adding-apps guide#5

Merged
mairas merged 1 commit into
mainfrom
docs/container-init-convention
Feb 18, 2026
Merged

Add init: true convention to adding-apps guide#5
mairas merged 1 commit into
mainfrom
docs/container-init-convention

Conversation

@mairas

@mairas mairas commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add init: true to compose conventions list with explanation (graceful shutdown via tini)
  • Add init: true to all docker-compose.yml examples (main, host networking, complete marine app)

Test plan

  • Verify docs build successfully
  • Review rendered page for correctness

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mairas

mairas commented Feb 18, 2026

Copy link
Copy Markdown
Contributor Author

PR Review: Add init: true convention to adding-apps guide

Summary

Clean, well-scoped documentation change. Adds init: true to all three docker-compose.yml examples in the adding-apps guide and documents the convention in the conventions list. The change is consistent and the explanation is accurate.

Review Details

Consistency check -- all examples updated:

  • Main example (line 104): added
  • Host networking example (line 139): added
  • Complete marine app example (line 256): added

All three compose examples in the file now include init: true. No examples were missed.

Consistency check -- matches actual codebase:
All 5 apps in halos-marine-containers and all 4 services in halos-core-containers/docker-compose.yml already use init: true. The docs are correctly documenting an established convention, not introducing a new one.

Placement: init: true is placed after container_name and before restart: unless-stopped in all examples, which matches the ordering in the actual app compose files. The convention bullet is listed first in the conventions list, which makes sense since it is a fundamental container setting.

Explanation accuracy: The description "Docker uses tini as PID 1 for proper signal handling (graceful shutdown)" is correct. Docker's --init flag (and compose init: true) injects tini as PID 1, which forwards signals and reaps zombie processes.

Minor Observation

The explanation mentions "graceful shutdown" as the benefit, which is one aspect. Tini also reaps zombie processes, which can matter for long-running containers that spawn child processes. This is a minor point -- the current wording is fine for a conventions list and covers the primary motivation.

Verdict

Approve. The change is correct, consistent across all examples, and matches the existing codebase convention. No issues found.

CI Status: No CI checks configured for this repository.

@mairas

mairas commented Feb 18, 2026

Copy link
Copy Markdown
Contributor Author

Code Review

Approved. Clean, well-scoped PR.

  • init: true added to all 3 compose examples (main, host networking, complete marine app)
  • Convention documented in the key conventions list with accurate explanation
  • Placement matches the ordering used in actual app compose files

No issues found.

🤖 Reviewed with Claude Code

@mairas mairas merged commit 0531bd9 into main Feb 18, 2026
@mairas mairas deleted the docs/container-init-convention branch May 27, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant