update dockerfile
This commit is contained in:
+5
-8
@@ -1,17 +1,14 @@
|
||||
# Build stage — use Node to correctly install native deps
|
||||
FROM node:22-alpine AS build-stage
|
||||
FROM node:20-alpine as build-stage
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm ci --os=linux --cpu=x64
|
||||
|
||||
RUN npm install --ignore-scripts=false --force
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
# Run stage — use Bun for serving
|
||||
FROM oven/bun:1 AS production-stage
|
||||
FROM node:20-alpine as production-stage
|
||||
WORKDIR /app
|
||||
RUN npm rebuild --verbose sharp
|
||||
COPY --from=build-stage /app /app
|
||||
EXPOSE 3000
|
||||
ENV NODE_ENV=production
|
||||
CMD ["bun", "run", "start"]
|
||||
CMD ["npm", "run", "start"]
|
||||
|
||||
Reference in New Issue
Block a user