diff --git a/.codepress/dev-server/Dockerfile.web b/.codepress/dev-server/Dockerfile.web new file mode 100644 index 0000000..da5a37f --- /dev/null +++ b/.codepress/dev-server/Dockerfile.web @@ -0,0 +1,27 @@ +# Generated by CodePress bootstrap-dev-server. +# Dev-mode image for the "web" frontend (Live Dev Server). +# Edits are preserved, but running /bootstrap-dev-server again may overwrite them. +FROM node:22-bookworm-slim + +RUN corepack enable +WORKDIR /app + +# Install deps from the lockfile in a cached layer. +COPY package.json package-lock.json ./ +RUN npm ci + +# Copy the rest of the repo (build context is the repo root). +COPY . . + +# HMR + bind config — values come from the runtime, never hardcoded. +# CRA reads HOST (bind address), PORT, and WDS_SOCKET_PORT (HMR websocket public port). +ENV HOSTNAME=0.0.0.0 \ + PORT=3000 \ + CODEPRESS_HMR_CLIENT_PORT=443 \ + CODEPRESS_HMR_PROTOCOL=wss + +EXPOSE 3000 + +# Dev command (HMR on). Map HOSTNAME → HOST and CODEPRESS_HMR_CLIENT_PORT → WDS_SOCKET_PORT +# so webpack-dev-server binds 0.0.0.0 and the browser HMR client connects to the public port. +CMD ["sh", "-c", "HOST=${HOSTNAME} WDS_SOCKET_PORT=${CODEPRESS_HMR_CLIENT_PORT} npm start"] diff --git a/.codepress/dev-server/recipe.json b/.codepress/dev-server/recipe.json new file mode 100644 index 0000000..397d776 --- /dev/null +++ b/.codepress/dev-server/recipe.json @@ -0,0 +1,17 @@ +{ + "schema_version": 1, + "bootstrapped_at": "2026-06-16T05:50:00Z", + "discovery_branch": "codepress/codepress/bootstrap-live-dev-server-artifacts-e909c686", + "frontends": [ + { + "label": "web", + "working_dir": "", + "dockerfile_path": ".codepress/dev-server/Dockerfile.web", + "dev_command": "npm start", + "framework": "cra", + "package_manager": "npm", + "dev_port": 3000, + "system_packages": [] + } + ] +}