1.6 KiB
1.6 KiB
name, description, type
| name | description | type |
|---|---|---|
| Phase 1 task 1.1 scaffold decisions | Implementation decisions made during Phase 1 task 1.1 (project scaffold) for trm/directus | project |
Phase 1 task 1.1 — project scaffold decisions
Why: These are non-obvious deviations from the task spec that future task implementers need to know.
- entrypoint.sh calls
node cli.js bootstrapthenexec pm2-runtime start /directus/ecosystem.config.cjs, notexec /directus/cli.js start. Thebootstrapstep is idempotent and required for admin user creation. pm2-runtime provides crash recovery. postgresql16-clientis pre-installed in the Dockerfile viaapk add --no-cache postgresql16-client. This allows task 1.2'sapply-db-init.shto usepsqlwithout adding it later. Alpine 3.20 uses version-specific package names (no genericpostgresql-client).- Volume mount for db service is
/pgdata, not/var/lib/postgresql/data. Thetimescaledb-haimage setsPGDATA=/pgdata. directus-uploadsnamed volume maps to/directus/uploadsin the directus service. No uploads use-case in Phase 1, but declared now to avoid volume-mount pain later.KEYandSECRETin compose have no default — blank env var means Directus will fail loudly at boot, which is the right behavior.packageManagerfield omitted from package.json because the local pnpm version (10.x) doesn't match what the task spec implied (9.x). pnpm 10 is backward-compatible.- Dockerfile is single-stage in Phase 1. Multi-stage build with a Node builder for extensions lands in Phase 5.
How to apply: Read this before implementing tasks 1.2–1.7 to avoid re-discovering these facts.