Skip to content

Bootstrap CodePress Live Dev Server recipe + dev Dockerfile - #50

Open
codepress-dev[bot] wants to merge 1 commit into
masterfrom
codepress/dev@codepress.dev/bootstrap-live-dev-server-artifacts-8e33a53d
Open

Bootstrap CodePress Live Dev Server recipe + dev Dockerfile#50
codepress-dev[bot] wants to merge 1 commit into
masterfrom
codepress/dev@codepress.dev/bootstrap-live-dev-server-artifacts-8e33a53d

Conversation

@codepress-dev

@codepress-dev codepress-dev Bot commented Jul 27, 2026

Copy link
Copy Markdown

Summary

Adds the repository-owned Live Dev Server recipe and development Dockerfile for the Create React App frontend in web/. The image is intentionally thin: it starts the hot-reloading development server, binds to the preview host, and installs no source code or dependencies at image-build time.

The Django service needs no preview CORS change. It serves the built frontend from the same origin, has no existing CORS configuration, and the repository has no staging-only settings path where a safe preview allowance could be placed. No staging API URL was declared, so none was recorded.

Validation

  • Confirmed the recipe parses with schema version 1, one frontend, required fields, and an existing Dockerfile path.
  • Confirmed the Dockerfile uses the full Bookworm Node image, installs procps, binds through CODEPRESS_BIND_HOST, declares the preview HMR settings, and contains no source copy or baked dependencies.
  • Used Node 18 plus the OpenSSL legacy provider because this project uses Create React App 1 / webpack 2.

Generated with CodePress

Author the committed Live Dev Server artifacts for the `web` Create React App
frontend so previews boot from repo-owned files instead of a runtime heuristic.

- .codepress/dev-server/recipe.json — one frontends[] entry for web/ (cra,
  yarn, port 3000), pinning the dev command, install command and the
  web/yarn.lock dependency fingerprint.
- .codepress/dev-server/Dockerfile.web — thin, dev-mode, toolchain-only image.

The image targets node:18-bookworm because react-scripts 1.0.10 (webpack 2.6,
React 15) predates modern Node; 18 is the oldest bookworm-based official image.
It sets NODE_OPTIONS=--openssl-legacy-provider so webpack's md4 module hashing
works under OpenSSL 3, and DANGEROUSLY_DISABLE_HOST_CHECK so webpack-dev-server
accepts the preview hostname instead of returning "Invalid Host header".

No backend CORS change: the Django API in server/ carries no CORS surface and
serves the built frontend same-origin, so there is no cross-origin preview
traffic to allow. No staging backend URL was found, so none is recorded.

Co-authored-by: dev@codepress.dev <dev@codepress.dev>
@codepress-dev codepress-dev Bot added the cp:ready-for-review CodePress: finished and ready for review label Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cp:ready-for-review CodePress: finished and ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants