drop build stage to make server change works on prod
This commit is contained in:
11
Dockerfile
11
Dockerfile
@@ -1,4 +1,3 @@
|
|||||||
# Stage de build
|
|
||||||
FROM node:20-alpine AS build
|
FROM node:20-alpine AS build
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
@@ -9,15 +8,5 @@ RUN pnpm install --frozen-lockfile
|
|||||||
COPY . .
|
COPY . .
|
||||||
RUN pnpm build
|
RUN pnpm build
|
||||||
|
|
||||||
# Stage production
|
|
||||||
FROM node:20-alpine
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
COPY --from=build /app/.output .output
|
|
||||||
COPY --from=build /app/package.json ./
|
|
||||||
|
|
||||||
RUN pnpm install --prod --frozen-lockfile
|
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
CMD ["node", ".output/server/index.mjs"]
|
CMD ["node", ".output/server/index.mjs"]
|
||||||
|
|||||||
Reference in New Issue
Block a user