diff --git a/Dockerfile b/Dockerfile index 16cea0f..06a0fdd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,17 @@ FROM node:20-alpine AS base WORKDIR /app +ENV NPM_CONFIG_AUDIT=false \ + NPM_CONFIG_FUND=false \ + NPM_CONFIG_FETCH_RETRIES=5 \ + NPM_CONFIG_FETCH_RETRY_MINTIMEOUT=20000 \ + NPM_CONFIG_FETCH_RETRY_MAXTIMEOUT=120000 \ + NPM_CONFIG_FETCH_TIMEOUT=600000 # --- Backend --- FROM base AS backend COPY stellar-payment-platform/package*.json ./ COPY stellar-payment-platform/prisma ./prisma -RUN npm ci +RUN npm ci --no-audit --no-fund COPY stellar-payment-platform/ . RUN npx prisma generate EXPOSE 5000 @@ -15,7 +21,7 @@ CMD ["node", "server.js"] FROM base AS frontend-build COPY payment-dashboard/package*.json ./ RUN apk add --no-cache python3 make g++ linux-headers libusb-dev eudev-dev -RUN npm install --registry=https://registry.yarnpkg.com/ --network-timeout=1000000 --fetch-retries=5 --fetch-retry-mintimeout=20000 --fetch-retry-maxtimeout=120000 +RUN npm install --registry=https://registry.yarnpkg.com/ --no-audit --no-fund --fetch-retries=5 --fetch-retry-mintimeout=20000 --fetch-retry-maxtimeout=120000 --fetch-timeout=600000 COPY payment-dashboard/ . ARG VITE_API_BASE=http://localhost:5000 ENV VITE_API_BASE=$VITE_API_BASE diff --git a/Dockerfile-backend b/Dockerfile-backend index 0fba2e2..0c338de 100644 --- a/Dockerfile-backend +++ b/Dockerfile-backend @@ -1,10 +1,16 @@ # ---- Builder: install all dependencies and generate the Prisma client ---- FROM node:22-alpine AS builder WORKDIR /app +ENV NPM_CONFIG_AUDIT=false \ + NPM_CONFIG_FUND=false \ + NPM_CONFIG_FETCH_RETRIES=5 \ + NPM_CONFIG_FETCH_RETRY_MINTIMEOUT=20000 \ + NPM_CONFIG_FETCH_RETRY_MAXTIMEOUT=120000 \ + NPM_CONFIG_FETCH_TIMEOUT=600000 COPY stellar-payment-platform/package*.json ./ COPY stellar-payment-platform/prisma ./prisma -RUN npm ci +RUN npm ci --no-audit --no-fund COPY stellar-payment-platform/ . RUN npx prisma generate