Compare commits
2 Commits
7678967831
...
d23ff54de5
| Author | SHA1 | Date | |
|---|---|---|---|
| d23ff54de5 | |||
| 8e1a1bf5af |
19
Dockerfile
19
Dockerfile
@ -1,24 +1,25 @@
|
||||
|
||||
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
|
||||
|
||||
RUN corepack enable
|
||||
|
||||
RUN npm install -g pm2
|
||||
|
||||
# Copy package.json and your lockfile, here we add pnpm-lock.yaml for illustration
|
||||
COPY package*.json ./
|
||||
|
||||
# Install dependencies
|
||||
RUN npm i
|
||||
|
||||
# Copy the entire project
|
||||
COPY . .
|
||||
COPY --link . .
|
||||
|
||||
# Build the project
|
||||
RUN npm run build
|
||||
|
||||
# Change the port and host
|
||||
FROM base
|
||||
|
||||
COPY --from=build /src/.output /src/.output
|
||||
|
||||
ENV PORT=3001
|
||||
|
||||
EXPOSE 3001
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user