fix: upgrade to Node.js 20 for globalThis.crypto support

crypto.randomUUID() is used throughout services but crypto is not
a global in Node.js 18. Node.js 20 provides globalThis.crypto.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-02-19 19:15:36 -08:00
parent 39718a9a09
commit bbb288025a
2 changed files with 4 additions and 4 deletions

View File

@ -2,7 +2,7 @@
# Usage: docker build --build-arg SERVICE_NAME=auth-service --build-arg SERVICE_PORT=3001 -f Dockerfile.service .
# ===== Build Stage =====
FROM node:18-alpine AS builder
FROM node:20-alpine AS builder
RUN corepack enable
@ -37,7 +37,7 @@ ARG SERVICE_NAME
RUN pnpm turbo build --filter='./packages/shared/*' --filter=@it0/${SERVICE_NAME}
# ===== Production Stage =====
FROM node:18-alpine
FROM node:20-alpine
RUN corepack enable

View File

@ -1,5 +1,5 @@
# Next.js standalone production Dockerfile
FROM node:18-alpine AS builder
FROM node:20-alpine AS builder
WORKDIR /app
@ -11,7 +11,7 @@ COPY . .
RUN npm run build
# ===== Production =====
FROM node:18-alpine
FROM node:20-alpine
WORKDIR /app