Bootstrap CodePress Live Dev Server recipe + dev Dockerfile - #50
Open
codepress-dev[bot] wants to merge 1 commit into
Open
Conversation
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>
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.
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
procps, binds throughCODEPRESS_BIND_HOST, declares the preview HMR settings, and contains no source copy or baked dependencies.Generated with CodePress