Skip to content

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

Open
codepress-dev[bot] wants to merge 1 commit into
masterfrom
codepress/bootstrap-dev-server-20260728-064202
Open

Bootstrap CodePress Live Dev Server recipe + dev Dockerfile#57
codepress-dev[bot] wants to merge 1 commit into
masterfrom
codepress/bootstrap-dev-server-20260728-064202

Conversation

@codepress-dev

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

Copy link
Copy Markdown

Summary

Adds the repository-owned development-server recipe for the React frontend so preview sessions run the correct Yarn-based development command with hot reload.

Technical details

  • Declares the web Create React App frontend, its port, lockfile, and required process tooling.
  • Adds a thin Node 18 development image that binds externally and forwards the preview HMR port.
  • No staging API URL or CORS change was added: this sample frontend has no cross-origin API caller, and the Django app has no existing CORS surface.

Test plan

  • Start a Live Dev Server preview for web and confirm it loads on port 3000.
  • Edit a React source file and confirm hot reload reaches the preview.

Generated with CodePress

Adds the repo-committed Live Dev Server artifacts so previews boot from
this repo instead of a runtime heuristic:

- .codepress/dev-server/recipe.json  - one frontend entry for web/ (CRA,
  yarn, port 3000)
- .codepress/dev-server/Dockerfile.web - thin dev-mode image (no baked
  node_modules, no source COPY) that binds 0.0.0.0 and wires HMR to env vars

Node 18 is pinned because this app is Create React App 1.0.10
(webpack 2.6.1 / webpack-dev-server 2.5.0). Verified during bootstrap that
yarn install --frozen-lockfile + react-scripts start compile and serve on
Node 18.20.8, honor PORT, bind all interfaces, answer a preview-style Host
header with HTTP 200, and expose a live /sockjs-node HMR endpoint.

No staging backend URL was detected (repo has no .env*, CI, or deploy
config), so staging_backend_url is intentionally omitted. No preview-CORS
change was needed: the Django app in server/ serves the built React bundle
same-origin and has no CORS surface or cross-origin caller.

Co-authored-by: dev@codepress.dev <dev@codepress.dev>
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.

0 participants