Skip to content

feat(docker): add Dockerfile + docker-compose for dev and production (#24) - #114

Merged
datvt243 merged 1 commit into
stagingfrom
feat/issue-24-docker-support
Sep 6, 2026
Merged

feat(docker): add Dockerfile + docker-compose for dev and production (#24)#114
datvt243 merged 1 commit into
stagingfrom
feat/issue-24-docker-support

Conversation

@datvt243

@datvt243 datvt243 commented Sep 6, 2026

Copy link
Copy Markdown
Owner

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.

…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>
@datvt243
datvt243 merged commit 1ec67de into staging Sep 6, 2026
3 checks passed
@datvt243
datvt243 deleted the feat/issue-24-docker-support branch September 6, 2026 17:03
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