update dockerfile
This commit is contained in:
parent
7678967831
commit
8e1a1bf5af
14
Dockerfile
14
Dockerfile
@ -1,9 +1,11 @@
|
|||||||
|
|
||||||
FROM node:22-alpine AS build
|
ARG NODE_VERSION=22.16.0
|
||||||
|
|
||||||
|
FROM node:${NODE_VERSION}-slim as base
|
||||||
|
|
||||||
|
FROM base as build
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
RUN corepack enable
|
|
||||||
|
|
||||||
RUN npm install -g pm2
|
RUN npm install -g pm2
|
||||||
|
|
||||||
# Copy package.json and your lockfile, here we add pnpm-lock.yaml for illustration
|
# Copy package.json and your lockfile, here we add pnpm-lock.yaml for illustration
|
||||||
@ -13,11 +15,15 @@ COPY package*.json ./
|
|||||||
RUN npm i
|
RUN npm i
|
||||||
|
|
||||||
# Copy the entire project
|
# Copy the entire project
|
||||||
COPY . .
|
COPY --link . .
|
||||||
|
|
||||||
# Build the project
|
# Build the project
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
|
FROM base
|
||||||
|
|
||||||
|
COPY --from=build /src/.output /src/.output
|
||||||
|
|
||||||
# Change the port and host
|
# Change the port and host
|
||||||
ENV PORT=3001
|
ENV PORT=3001
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user