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
|
ENV PORT 3000
|
||||||
|
|
||||||
|
# Install pnpm globally
|
||||||
|
RUN npm install -g pnpm
|
||||||
|
|
||||||
# Create app directory
|
# Create app directory
|
||||||
RUN mkdir -p /usr/src/app
|
RUN mkdir -p /usr/src/app
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
# Installing dependencies
|
# Installing dependencies
|
||||||
COPY package*.json /usr/src/app/
|
COPY package*.json pnpm-lock.yaml* /usr/src/app/
|
||||||
|
|
||||||
# RUN npm install --force
|
# Install dependencies using pnpm
|
||||||
RUN npm install -g npm@11.0.0
|
RUN pnpm install --frozen-lockfile
|
||||||
RUN npm install next --legacy-peer-deps
|
|
||||||
|
|
||||||
# Copying source files
|
# Copying source files
|
||||||
COPY . /usr/src/app
|
COPY . /usr/src/app
|
||||||
|
|
||||||
# Building app
|
# Building app
|
||||||
RUN npm run build
|
RUN pnpm run build
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
# Running the app
|
# 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