diff --git a/dockerfile b/dockerfile index 6836318..fd7eeaf 100644 --- a/dockerfile +++ b/dockerfile @@ -23,6 +23,8 @@ ENV FFLOGS_GRAPHQL_URL=https://cn.fflogs.com/api/v2/client ENV FFLOGS_TOKEN_URL=https://cn.fflogs.com/oauth/token ENV FFLOGS_DEFAULT_SERVER_REGION=CN ENV FFLOGS_REQUEST_TIMEOUT_MS=10000 +# skia-canvas uses binary.module_name=index, so node-pre-gyp reads this mirror key. +ENV npm_config_index_binary_host_mirror=https://registry.npmmirror.com/-/binary/skia-canvas/ COPY package.json pnpm-lock.yaml ./ diff --git a/dockerfile.gateway b/dockerfile.gateway index 85fc0c9..daa5670 100644 --- a/dockerfile.gateway +++ b/dockerfile.gateway @@ -23,6 +23,8 @@ ENV FFLOGS_GRAPHQL_URL=https://cn.fflogs.com/api/v2/client ENV FFLOGS_TOKEN_URL=https://cn.fflogs.com/oauth/token ENV FFLOGS_DEFAULT_SERVER_REGION=CN ENV FFLOGS_REQUEST_TIMEOUT_MS=10000 +# skia-canvas uses binary.module_name=index, so node-pre-gyp reads this mirror key. +ENV npm_config_index_binary_host_mirror=https://registry.npmmirror.com/-/binary/skia-canvas/ COPY package.json pnpm-lock.yaml ./ diff --git a/test/modules/qqbot/napcat-webui-gateway/gateway-deployment.spec.ts b/test/modules/qqbot/napcat-webui-gateway/gateway-deployment.spec.ts index 0a863df..6ed51c0 100644 --- a/test/modules/qqbot/napcat-webui-gateway/gateway-deployment.spec.ts +++ b/test/modules/qqbot/napcat-webui-gateway/gateway-deployment.spec.ts @@ -43,6 +43,9 @@ describe('NapCat WebUI Gateway deployment configuration', () => { expect(dockerfile).toContain('mirrors.aliyun.com/debian'); expect(dockerfile).toContain('mirrors.aliyun.com/debian-security'); expect(dockerfile).toContain('Acquire::Retries=5'); + expect(dockerfile).toContain( + 'npm_config_index_binary_host_mirror=https://registry.npmmirror.com/-/binary/skia-canvas/', + ); } });