Commit 8b1717a
committed
docs(adr): consolidate ADR-T-009 plan into a single self-contained ADR
The implementation work for ADR-T-009 is done; the separate
phase-by-phase implementation plan that drove it has now
served its purpose. This change folds every decision the plan
recorded back into the ADR proper, deletes the plan file, and
migrates every cross-reference in the codebase to the ADR's
canonical `§D1`–`§D9` decision-section anchors. No runtime
behaviour changes — this is a docs-and-references pass on top
of the already-merged Phase 1–9 work.
Single source of truth
----------------------
- `adr/009-container-infrastructure-refactor.md`: rewritten as
the standalone reference for the refactor. Status flips from
"Implemented (Phases 1–9 complete)" to plain "Implemented";
the prose drops the phase scaffolding and is reorganised
around nine numbered decisions:
- §D1 — Compose split (production-shaped baseline + auto-loaded
dev override, wrapped by `make up-dev` / `make up-prod`).
- §D2 — Strip credentials from shipped defaults; `tracker.token`
and `database.connect_url` mandatory at the schema level.
- §D3 — Entry script rewrite around the JSON config probe and
the sourced POSIX shell library.
- §D4 — Lean release runtime base + curated busybox applet set;
`/busybox/` only on the debug image.
- §D5 — Helper-binary dep-closure discipline (`index-cli-common`,
JSON-on-stdout contract, root-only `0500 root:root` posture).
- §D6 — `API_PORT` / `IMPORTER_API_PORT` demoted from build-time
`ARG` to runtime `ENV`.
- §D7 — `USER_ID` guard tightened to "numeric, non-zero" (was
`>= 1000`).
- §D8 — Vendored `su-exec.c` provenance + SHA-256-anchored
audit log + CI guard.
- §D9 — Build-context hygiene (`adr/`, `docs/` excluded via
`.containerignore`).
- `adr/009-implementation-plan.md`: deleted (~3000 lines). Every
durable decision lives in the ADR; the historical phase
ordering, file lists, and merge-conflict notes belong to the
git history of the now-merged work.
Cross-reference migration
-------------------------
- `Containerfile`, `share/container/entry_script_sh`,
`contrib/dev-tools/su-exec/AUDIT.md`,
`.github/workflows/container.yaml`,
`packages/index-config-probe/src/{lib.rs,bin/torrust-index-config-probe.rs}`,
`docs/containers.md`: every `§N` / "implementation plan §N.M"
reference rewritten as `ADR-T-009 §DN`. Comments that pointed
at "Phase 9 §9" or "implementation plan §6.1" now point at the
ADR's permanent anchors so the references survive any future
reorganisation of the ADR's internal layout.
CHANGELOG
---------
- Expand the previously placeholder ADR-T-009 bullet into a
full Added / Changed / Removed audit covering the seven new
workspace artefacts (`index-cli-common`, `index-config-probe`,
`index-entry-script`, the sourced shell library,
`Makefile`, `compose.override.yaml`,
`contrib/dev-tools/su-exec/AUDIT.md`), the `jq_donor`
Containerfile stage, `Info::from_env`, the
`DEFAULT_CONFIG_TOML_PATH` re-export, and the
`ENTRY_ENV_VARS` manifest contract; the `release` /
`debug` runtime base split, the production-shaped
`compose.yaml`, the `API_PORT` / `IMPORTER_API_PORT`
demotion, the rewritten health-check and auth-keypair
helpers, and the `USER_ID` guard change (flagged
**BREAKING**); and the credential / `[mail.smtp]` /
`[auth]`-paths removal from the shipped TOMLs together with
the `Default` impls (`Settings`, `Tracker`, `Database`)
and the two retired `src/bin/*` helpers.
README and crate docs
---------------------
- `README.md`: note that the documented "for deployment, you
__should__ override the tracker token" guidance is now
schema-mandatory (per §D2), not advisory.
- `src/lib.rs`: update the "Run with docker" example to supply
the two now-mandatory `..._OVERRIDE_TRACKER__TOKEN` /
`..._OVERRIDE_DATABASE__CONNECT_URL` env vars (and drop the
`sqlite3 … VACUUM` pre-seed step, since the entry script's
§D3 seed-on-empty path handles that). Cross-link the
container guide and ADR-T-009; document the Compose split
and the `make up-dev` / `make up-prod` wrappers. Refresh the
Configuration section to mark `tracker.token` /
`database.connect_url` as mandatory, point at the standalone
`torrust-index-config` crate, and fix the env-var name typo
(`TORRUST_INDEX_CONFIG_PATH` → `TORRUST_INDEX_CONFIG_TOML_PATH`).1 parent 51cf24a commit 8b1717a
12 files changed
Lines changed: 1306 additions & 3727 deletions
File tree
- .github/workflows
- adr
- contrib/dev-tools/su-exec
- docs
- packages/index-config-probe/src
- bin
- src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
72 | | - | |
| 71 | + | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 12 | + | |
41 | 13 | | |
42 | 14 | | |
43 | 15 | | |
44 | 16 | | |
45 | 17 | | |
46 | | - | |
| 18 | + | |
47 | 19 | | |
48 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
49 | 79 | | |
50 | 80 | | |
51 | 81 | | |
| |||
157 | 187 | | |
158 | 188 | | |
159 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
160 | 228 | | |
161 | 229 | | |
162 | 230 | | |
| |||
245 | 313 | | |
246 | 314 | | |
247 | 315 | | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
248 | 346 | | |
249 | 347 | | |
250 | 348 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
| 152 | + | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | | - | |
251 | | - | |
| 250 | + | |
| 251 | + | |
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| |||
0 commit comments