diff --git a/.codepress/dev-server/Dockerfile.main b/.codepress/dev-server/Dockerfile.main new file mode 100644 index 0000000..e75863f --- /dev/null +++ b/.codepress/dev-server/Dockerfile.main @@ -0,0 +1,30 @@ +# Generated by CodePress bootstrap-dev-server. +# Dev-mode image for the "main" frontend (Live Dev Server). +# Edits are preserved, but running /bootstrap-dev-server again may overwrite them. +FROM node:22-bookworm-slim + +# Install yarn v1 (no packageManager field in package.json, so corepack cannot resolve the version). +RUN npm install -g yarn + +WORKDIR /app + +# Install deps from the lockfile in a cached layer. +COPY package.json yarn.lock ./ +RUN yarn install --frozen-lockfile + +# Copy the rest of the repo (build context is the repo root). +COPY . . + +# HMR + bind config — values come from the runtime, never hardcoded. +# scripts/start.js reads HOST (not HOSTNAME) and PORT from env. +# CODEPRESS_HMR_CLIENT_PORT maps to WDS_SOCKET_PORT for the webpack-dev-server client. +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 the webpack-dev-server client connects through the proxy at the public port. +CMD ["sh", "-c", "HOST=${HOSTNAME} WDS_SOCKET_PORT=${CODEPRESS_HMR_CLIENT_PORT} yarn start"] diff --git a/.codepress/dev-server/recipe.json b/.codepress/dev-server/recipe.json new file mode 100644 index 0000000..6206229 --- /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-dev-server-artifacts-cd422ee1", + "frontends": [ + { + "label": "main", + "working_dir": "", + "dockerfile_path": ".codepress/dev-server/Dockerfile.main", + "dev_command": "yarn start", + "framework": "cra", + "package_manager": "yarn", + "dev_port": 3000, + "system_packages": [] + } + ] +}