Fix React 19 peer conflicts breaking npm ci in Docker build

This commit is contained in:
2026-08-17 23:55:17 +05:30
parent ff841f8b86
commit 01faf3cd8d
3 changed files with 1297 additions and 2917 deletions

View File

@@ -4,9 +4,14 @@ FROM node:22-alpine AS build
WORKDIR /app
# Safety valve for the 2 GB host: without a cap a runaway build can exhaust the
# server's RAM and take down neighbouring containers. Measured peak for this app
# is ~550 MB, so 1 GB leaves headroom while still failing the build rather than
# the server. Raise this only if the host gets more RAM.
# server's RAM and take down neighbouring containers, so the build fails instead
# of the server.
#
# Headroom is thinner than it used to be. The old note here recorded a ~550 MB
# peak; after the React 19 upgrade and adding Astryx the build measures ~967 MB
# peak RSS, which still completes under this cap but no longer leaves much room.
# If a future dependency tips it over, raise this only alongside more host RAM —
# not on its own, which just moves the failure from the build to the machine.
ENV NODE_OPTIONS=--max-old-space-size=1024
# Install deps from the lockfile first so this layer is reused when only src changes