feat(docker): add Dockerfile + docker-compose for dev and production (#24) - #114
Merged
Conversation
…24) Adds Docker support: Dockerfile (multi-stage: base/deps/development/ build/prod-deps/production), docker-compose.yml (dev — hot reload, Mongo 7, insecure built-in dev secrets so `docker compose up` works with no .env), docker-compose.prod.yml (production — compiled image, no secret defaults, Mongo not exposed to host, HEALTHCHECK against /health), .dockerignore, and a README Docker section. Chromium installed via apt in the image (not Puppeteer's own download) with PUPPETEER_EXECUTABLE_PATH set, so PDF export actually works in a container. Live-testing surfaced 2 real pre-existing app bugs, worked around at the infra layer (not fixed in src/, flagged as their own traps/nodes in agent-hub/doctrine/domains/PROJECT.md for a future pass): - src/server.ts:127 always hardcodes port 3008 in production, ignoring LOCAL_PORT — docker-compose.prod.yml now hardcodes 3008 on both sides instead of templating off LOCAL_PORT. - src/services/createPDF.ts, uploadCV.middleware.ts, and uploadImages.middleware.ts write to hardcoded relative `src/public/...` paths regardless of NODE_ENV — the minimal production image (dist/ only, no src/) ENOENT'd on PDF export until the Dockerfile's production stage now `mkdir -p`s the 3 directories. - npm run build: clean (tsc && npm run copy) - npm test: 13 suites / 77 tests passed (unchanged — no Jest coverage for Docker infra; acceptance verified via live container testing instead, see evidence) - Live-verified end-to-end against real local Docker containers: dev and production stacks both reach healthy, register/login/ download-pdf/self-delete round trip confirmed working on both Node: add-docker-support (SEALED) Evidence: agent-hub/evidence/implementer/2026-09-06/add-docker-support-diff.md, agent-hub/evidence/implementer/2026-09-06/add-docker-support-reopen-fix-diff.md, agent-hub/evidence/verifier/2026-09-06/add-docker-support-reopen.md, agent-hub/evidence/verifier/2026-09-06/add-docker-support-round2-seal.md Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
b7d0f06 feat(docker): add Dockerfile + docker-compose for dev and production (#24)
Adds Docker support: Dockerfile (multi-stage: base/deps/development/build/prod-deps/production), docker-compose.yml (dev), docker-compose.prod.yml (production), .dockerignore, README Docker section.
Live-testing surfaced 2 real pre-existing app bugs, worked around at the infra layer and flagged as their own traps/nodes (not fixed here):
fix-prod-port-ignores-local-port,fix-hardcoded-src-public-write-paths.Node: add-docker-support (SEALED, 2 rounds — round 1 REOPENed on the port bug, round 2 fixed it + found/worked around the second bug).
Closes #24.