Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,13 @@ pnpm -r --filter='./packages/**' build

### Environment files

| File | Purpose |
| ------------------------------- | -------------------------------------------------------- |
| `apps/builder/.env` | Default config (DB URL, PostgREST URL, `DEV_LOGIN=true`) |
| `apps/builder/.env.development` | Local overrides (`AUTH_SECRET=1234`, `DOCKER_DEV=true`) |
| File | Purpose |
| ------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| `apps/builder/.env` | Default config (DB URL, PostgREST URL, `DEV_LOGIN=true`) |
| `apps/builder/.env.development` | Local overrides (`AUTH_SECRET=1234`, `DOCKER_DEV=true`) |
| `apps/builder/.npmrc` | pnpm hoisting config — forces `react-router-dom` top-level symlink in `pnpm deploy --prod` (Docker image fix) |

Both files are committed. Edit `.env.development` for machine-specific overrides.
Both env files are committed. Edit `.env.development` for machine-specific overrides.

---

Expand Down
8 changes: 8 additions & 0 deletions apps/builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ RUN pnpm --filter=@webstudio-is/http-client build && \
# (not in the package's own .gitignore) specifically so pnpm deploy includes it.
RUN pnpm --filter "@webstudio-is/builder" --prod deploy /standalone

# pnpm v9 with autoInstallPeers=true does not create a top-level symlink for
# react-router-dom: it treats it as already provided via @remix-run/react's peer
# resolution, so Node cannot find it at runtime (ERR_MODULE_NOT_FOUND).
# Create the symlink explicitly from the virtual store.
RUN entry=$(ls /standalone/node_modules/.pnpm | grep '^react-router-dom@' | head -1) && \
[ -n "$entry" ] && [ ! -e /standalone/node_modules/react-router-dom ] && \
ln -sf ".pnpm/$entry/node_modules/react-router-dom" /standalone/node_modules/react-router-dom || true

# ─── Stage 2: prisma-cli ─────────────────────────────────────────────────────
# Install the Prisma CLI in isolation so it carries Alpine-compatible engine binaries
# without polluting the app's node_modules.
Expand Down
Loading