feat: update dockerfile and change runtime to pnpm
This commit is contained in:
parent
5069332589
commit
35c07fcaef
14
Dockerfile
14
Dockerfile
|
|
@ -2,23 +2,25 @@ FROM node:23.5.0-alpine
|
|||
|
||||
ENV PORT 3000
|
||||
|
||||
# Install pnpm globally
|
||||
RUN npm install -g pnpm
|
||||
|
||||
# Create app directory
|
||||
RUN mkdir -p /usr/src/app
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Installing dependencies
|
||||
COPY package*.json /usr/src/app/
|
||||
COPY package*.json pnpm-lock.yaml* /usr/src/app/
|
||||
|
||||
# RUN npm install --force
|
||||
RUN npm install -g npm@11.0.0
|
||||
RUN npm install next --legacy-peer-deps
|
||||
# Install dependencies using pnpm
|
||||
RUN pnpm install --frozen-lockfile
|
||||
|
||||
# Copying source files
|
||||
COPY . /usr/src/app
|
||||
|
||||
# Building app
|
||||
RUN npm run build
|
||||
RUN pnpm run build
|
||||
EXPOSE 3000
|
||||
|
||||
# Running the app
|
||||
CMD "npm" "run" "start"
|
||||
CMD ["pnpm", "run", "start"]
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue