docs: make the documented local setup match what the project does - #293
Conversation
JWT_SECRET is required by compose.yml (${JWT_SECRET:?...}) but was
explained only in dpc-api/README.md, which the root README never linked.
README's ./up.sh step and CONTRIBUTING's `docker compose up` both told a
new contributor to run a command that aborts. Both now set it, and
CONFIG.md documents it as a required variable.
CONFIG.md also pointed Docker Compose users at .env.local. Compose
substitutes from .env, and the website image copies no env file at all,
so that file did nothing on a Compose run. The two paths and the file
each reads are now spelled out, and .env is git-ignored since it holds
the secret.
README described the project as a Next.js app alone, omitting the
dpc-api Spring Boot back end that CI builds and Compose runs, and titled
its Compose section "Test Server with Hot-Reloading" -- that stack runs
next start against a production build with no source volume, so it does
not reload. npm run dev is now named as the hot-reloading path.
Closes #289
Closes #290
Closes #291
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A UserAuth instance started outside Compose needs the secret too, so "only applies to the Docker Compose stack" overstated it. Also matches README's new backend heading to CONTRIBUTING's. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- The Compose setup steps skipped `npm install`, but compose.yml bind-mounts ./node_modules; on a fresh clone the empty host directory shadows what the image installed and the container cannot start. - The env-file table claimed the two run paths read different files. Next.js reads .env as well as .env.local, so a .env written for Compose is also inlined by a later npm run build. - CONTRIBUTING's Compose command lacked --build, which would serve a cached image of the code as it was. - Installation still headed Compose "Recommended for Development" while the section it links to now says npm run dev is the development path. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ReviewReviewed at head Findings (all four addressed in
|
Summary
Three documentation inaccuracies were found during triage, all on the path a new contributor follows to run this project locally. All three are fixed here; no application code is touched.
JWT_SECRETwas undocumented outsidedpc-api/README.md.compose.ymldeclares it as${JWT_SECRET:?...}, which abortsdocker compose up— and therefore./up.sh— when it is unset.README.md's Docker Compose setup step andCONTRIBUTING.md'sdocker compose upline both told the reader to run those commands bare, so the first command a new contributor ran failed, with the explanation living in a file the rootREADME.mddid not link. AJWT_SECRETentry has been added toCONFIG.md's Environment Variables section (required, no default, min 32 bytes, a runtime secret rather than a build-time inline), and both commands now set it (JWT_SECRETis required to start the stack but is documented nowhere in the root docs #290).CONFIG.mdpointed Docker Compose users at.env.local. Compose resolves${VAR}from the shell or from.env; it does not read.env.local, andDockerfilecopies no env file into the website image, so that instruction had no effect on a Compose run. The Environment Variables section now carries a small table naming which file each path actually reads, and the Docker Compose Configuration section documents.env. Since that file is now whereJWT_SECRETgoes,.envhas been added to.gitignore—.env*.localwas ignored, but a bare.envwas not (CONFIG.md points Docker Compose users at.env.local, a file Compose never reads #289).README.mdomitteddpc-apiand mislabelled the Compose stack. The repository holds a Spring Boot back end that.github/workflows/build.ymlbuilds with./mvnw verify -Bunder Java 17 and thatcompose.ymlruns, yet the README described the project as a Next.js application alone, listed Node.js as the only prerequisite, and linked every doc exceptdpc-api/README.md. Its Compose section was also headed "Test Server with Hot-Reloading", which that stack is not:Dockerfilerunsnpm run buildand startsnext start, and the service mounts no source volume, so an edit needs a rebuild.npm run dev— previously the afterthought below it — is now named as the hot-reloading path (README omits thedpc-apibackend entirely, and calls the Compose stack hot-reloading when it is a production build #291).Test plan
63b8c7a:compose.yml(the${JWT_SECRET:?...}declaration, the five services and which ports are published),Dockerfile(theCOPYlist,RUN npm run build,CMD npm run start),.github/workflows/build.yml(thebuild-apijob),.gitignore, anddpc-api/README.md(theDPC_SYNC_*table the new cross-reference points at).CONFIG.md#jwt_secretresolves to the new### JWT_SECRETheading, anddpc-api/README.mdexists.npm run lint,npm testandnpm run buildwere not run locally — no Node.js runtime is available in the environment this was prepared in. The diff is Markdown and.gitignoreonly, so none of those checks covers a changed file; CI on this PR's head SHA remains the authoritative signal and must be green before merge.Closes #289
Closes #290
Closes #291
Deferred this cycle
up.sh/down.shcall the retireddocker-composev1 binary and have a commented-out shebang #292 (up.sh/down.shcall the retireddocker-composev1 binary and have a commented-out shebang) was filed during the same triage but left out deliberately: it changes executable scripts whose verification needs a real Docker run, which neither CI nor this environment provides, whereas everything here is documentation.dpc-apidoes not receive).This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).
drafted by Claude on behalf of Daniel Stephenson