Skip to content
Draft
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
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,24 @@ FROM node:20-slim AS frontend-builder

WORKDIR /app

# Install system dependencies required to compile native modules (e.g. canvas).
# node:20-slim lacks the build toolchain and Cairo development headers that
# node-gyp needs when building the "canvas" package during yarn install.
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 make g++ pkg-config \
libcairo2-dev libjpeg-dev libpango1.0-dev libgif-dev librsvg2-dev \
&& rm -rf /var/lib/apt/lists/*

# Install dependencies
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile

# Raise the Node.js heap limit to avoid "JavaScript heap out of memory"
# failures during the Vite production build. Node defaults to ~2 GB regardless
# of the memory allocated to Docker. Override with --build-arg NODE_HEAP_MB=...
ARG NODE_HEAP_MB=8192
ENV NODE_OPTIONS=--max-old-space-size=${NODE_HEAP_MB}

# Copy source and build
COPY index.html tsconfig.json vite.config.ts eslint.config.js ./
COPY public ./public
Expand Down
4 changes: 4 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ services:
build:
context: .
dockerfile: Dockerfile
args:
# Node.js heap limit (in MB) used during the frontend build to avoid
# "JavaScript heap out of memory" failures. Increase if the build OOMs.
NODE_HEAP_MB: "8192"
image: data-formulator:latest
ports:
- "5567:5567"
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1268,22 +1268,22 @@
resolved "https://registry.npmjs.org/@tiptap/extension-strike/-/extension-strike-3.22.2.tgz"
integrity sha512-YFC3elKU1L8PiGbcB6tqd/7vWPF5IbydJz0POJpHzSjstX+VfT8VsvS7ubxVuSIWQ11kGkH3mzX6LX8JHsHZxg==

"@tiptap/extension-table-cell@^3.23.6":
"@tiptap/extension-table-cell@^3.22.2":
version "3.23.6"
resolved "https://registry.npmjs.org/@tiptap/extension-table-cell/-/extension-table-cell-3.23.6.tgz"
integrity sha512-hS9TmmvRlT9/ikT+0ukACS+hmJuii4zQaH47cg3oJkz/Fv7O7tL7GZniKtK6l2OUZGPhY+4SV2RkDB6bD7DXfw==

"@tiptap/extension-table-header@^3.23.6":
"@tiptap/extension-table-header@^3.22.2":
version "3.23.6"
resolved "https://registry.npmjs.org/@tiptap/extension-table-header/-/extension-table-header-3.23.6.tgz"
integrity sha512-D6o0a1cJXUU0xWakainBFGPnGHinQkPcdu1YqGd/PoFANY38lnuZt/NW2O/OLfLXu5LXDRfpqF1+dsKww27dUA==

"@tiptap/extension-table-row@^3.23.6":
"@tiptap/extension-table-row@^3.22.2":
version "3.23.6"
resolved "https://registry.npmjs.org/@tiptap/extension-table-row/-/extension-table-row-3.23.6.tgz"
integrity sha512-OauWVzkyRQg0rKOqM/a3PuKPc1S7YXMb1LRN7Nh8Ytvglvd7GFRTbl1lVqdZRaz4Jzopag4PQnriIZfMPUpxWw==

"@tiptap/extension-table@^3.23.6":
"@tiptap/extension-table@^3.22.2":
version "3.23.6"
resolved "https://registry.npmjs.org/@tiptap/extension-table/-/extension-table-3.23.6.tgz"
integrity sha512-XbhZXjhsS6AP7ThoZxjAnNs+NiR81YRori25l6E+ORqB7quiPkIXOAi5h4AIpkn/CYIqze6ere11lWsYpDjtaQ==
Expand Down