chore: align Dockerfile to node:24 (matches engines pin), add openssl for prisma
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
1 parent
f0bdf185d5
commit
f5b1593e46
1 file changed
+5
-4
+5
-4
@@ -3,23 +3,24 @@
|
||||
# Multi-stage build: install → build → run
|
||||
|
||||
# --- Stage 1: Install dependencies ---
|
||||
FROM node:22-slim AS deps
|
||||
FROM node:24-slim AS deps
|
||||
WORKDIR /app
|
||||
COPY package.json bun.lock ./
|
||||
RUN npm install --legacy-peer-deps
|
||||
|
||||
# --- Stage 2: Build ---
|
||||
FROM node:22-slim AS builder
|
||||
FROM node:24-slim AS builder
|
||||
WORKDIR /app
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
ENV DATABASE_URL="file:/app/db/custom.db"
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends openssl && rm -rf /var/lib/apt/lists/*
|
||||
RUN npx prisma generate
|
||||
RUN npm run build
|
||||
|
||||
# --- Stage 3: Runner ---
|
||||
FROM node:22-slim AS runner
|
||||
FROM node:24-slim AS runner
|
||||
WORKDIR /app
|
||||
|
||||
ENV NODE_ENV=production
|
||||
@@ -29,7 +30,7 @@ ENV HOSTNAME=0.0.0.0
|
||||
|
||||
# Install only what's needed for production
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
sqlite3 curl && \
|
||||
sqlite3 curl openssl && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Pin prisma CLI into the image so CMD's db push doesn't npx-download prisma on every start
|
||||
|
||||
Reference in new issue
Block a user