alexcdev1 6 months ago
parent
commit
c7c0a2c39e
2 changed files with 6 additions and 1 deletions
  1. 2 0
      .npmrc
  2. 4 1
      Dockerfile.prod

+ 2 - 0
.npmrc

@@ -0,0 +1,2 @@
+registry=https://registry.npmmirror.com
+network-timeout=100000

+ 4 - 1
Dockerfile.prod

@@ -2,10 +2,13 @@
 FROM node:alpine AS deps
 # Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
 RUN apk add --no-cache libc6-compat
+RUN npm install -g pnpm
+
 WORKDIR /app
 COPY package.json yarn.lock ./
 COPY .env.local .env.local
-RUN yarn install --frozen-lockfile
+COPY .npmrc .npmrc
+RUN pnpm install --frozen-lockfile
 
 # Rebuild the source code only when needed
 FROM node:alpine AS builder