update docker file
This commit is contained in:
+6
-7
@@ -1,15 +1,14 @@
|
||||
FROM oven/bun:1 AS build-stage
|
||||
# Build stage — use Node to correctly install native deps
|
||||
FROM node:22-alpine AS build-stage
|
||||
WORKDIR /app
|
||||
|
||||
# Allow native module installs (sharp needs this)
|
||||
ENV BUN_CONFIG_NO_NATIVE_INSTALLS=0
|
||||
|
||||
COPY package.json bun.lockb* ./
|
||||
RUN bun install --frozen-lockfile && bun add sharp --platform=linux --arch=x64
|
||||
COPY package*.json ./
|
||||
RUN npm ci --os=linux --cpu=x64
|
||||
|
||||
COPY . .
|
||||
RUN bun run build
|
||||
RUN npm run build
|
||||
|
||||
# Run stage — use Bun for serving
|
||||
FROM oven/bun:1 AS production-stage
|
||||
WORKDIR /app
|
||||
COPY --from=build-stage /app /app
|
||||
|
||||
Reference in New Issue
Block a user