Bootstrap CodePress Live Dev Server recipe + dev Dockerfile - #35
Open
codepress-dev[bot] wants to merge 1 commit into
Open
Conversation
Author the committed Live Dev Server artifacts for this repo so previews boot from repo-owned files instead of a runtime heuristic. Discovery found one runnable frontend, web/ (create-react-app, react-scripts 1.0.10, Yarn Classic, port 3000). The dev image pins node:16-bookworm because webpack 2.6.1 hashes with md4, which OpenSSL 3 (Node 17+) removed; on a newer base the dev server exits with ERR_OSSL_EVP_UNSUPPORTED. The image is thin — toolchain only, no baked node_modules and no source COPY — and binds via CODEPRESS_BIND_HOST with HMR wired to the runtime env vars. No staging backend URL is persisted: the repo has no .env files, CI workflow env, or rewrite config declaring one. No backend CORS change: the Django server in server/ has no CORS surface (django-cors-headers is not installed, no allowlist), the React app makes no cross-origin API calls, and Django serves the built frontend same-origin from its catch-all index view. It also has no staging settings module to scope such a change to. 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 committed Live Dev Server configuration for the Create React App frontend in
web/. The preview image uses Node 16 because this legacy react-scripts/webpack toolchain is incompatible with OpenSSL 3 in newer Node releases..codepress/dev-server/recipe.jsonwith the CRA/Yarn dev command, port 3000, dependency lockfile, andprocps..codepress/dev-server/Dockerfile.webthat binds to0.0.0.0, keeps dependencies and source at runtime, and configures HMR from the preview environment.Validation
Validated the JSON schema and the Dockerfile contract statically: the recipe references the Dockerfile, the image is development-mode and thin, and it includes the required bind/HMR environment configuration. The image was not built locally.
Staging CORS would take effect only after a staging deployment if the project later gains a cross-origin API surface.
Generated with CodePress