182a5dab16
family-chart 0.9.0 stacks all of a person's spouses on one gender-determined side, so someone with two spouses (e.g. a woman with two husbands) renders with both spouses piled above/below her and ambiguous child lines. Patch the library (via patch-package) so the person stays centered and their spouses split to alternating sides — spouse 1 above, spouse 2 below, further spouses farther out — and order each couple's children to match, so children descend from between the correct pair without crossed lines: - setupSpouses: keep the person centered; place spouses at alternating offsets and recenter the cluster on the person's slot. - sortChildrenWithSpouses: order children by spouse order (gender-independent) to match the new spouse positions. Adds patch-package + a postinstall hook, and COPY patches into the Dockerfile deps stage so the patch applies during `npm ci` in CI. Verified the patch re-applies on a clean install and the production build passes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Justin Paul <justin@jpaul.me>
28 lines
769 B
Docker
28 lines
769 B
Docker
# syntax=docker/dockerfile:1
|
|
|
|
FROM node:22-bookworm-slim AS deps
|
|
WORKDIR /app
|
|
COPY package.json package-lock.json ./
|
|
# patches/ must be present before `npm ci` so the postinstall (patch-package)
|
|
# can apply our vendored family-chart layout fix.
|
|
COPY patches ./patches
|
|
RUN npm ci
|
|
|
|
FROM node:22-bookworm-slim AS build
|
|
WORKDIR /app
|
|
COPY --from=deps /app/node_modules ./node_modules
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
FROM node:22-bookworm-slim AS runner
|
|
WORKDIR /app
|
|
ENV NODE_ENV=production \
|
|
PORT=3000 \
|
|
HOSTNAME=0.0.0.0
|
|
# Next standalone output: a minimal server with only the traced dependencies.
|
|
COPY --from=build /app/.next/standalone ./
|
|
COPY --from=build /app/.next/static ./.next/static
|
|
COPY --from=build /app/public ./public
|
|
EXPOSE 3000
|
|
CMD ["node", "server.js"]
|