diff --git a/.github/workflows/deploy-tencent.yml b/.github/workflows/deploy-tencent.yml index cc74175..02db889 100644 --- a/.github/workflows/deploy-tencent.yml +++ b/.github/workflows/deploy-tencent.yml @@ -94,7 +94,12 @@ jobs: fi - name: Build image from artifact - run: docker build --tag "meteortest-web:${GITHUB_SHA}" --file source/apps/web/Dockerfile source/apps/web + run: >- + docker build + --build-arg NPM_REGISTRY=https://registry.npmmirror.com + --tag "meteortest-web:${GITHUB_SHA}" + --file source/apps/web/Dockerfile + source/apps/web - name: Deploy env: diff --git a/apps/web/Dockerfile b/apps/web/Dockerfile index 1813eb2..df77c9d 100644 --- a/apps/web/Dockerfile +++ b/apps/web/Dockerfile @@ -1,8 +1,9 @@ FROM node:24-bookworm-slim AS dependencies WORKDIR /app +ARG NPM_REGISTRY=https://registry.npmjs.org COPY package.json package-lock.json ./ -RUN npm ci +RUN npm ci --registry="${NPM_REGISTRY}" FROM dependencies AS builder