Compare commits

..

No commits in common. "4b9616b970099215ffd565e0945ce4c0f3603850" and "21ade761d153ae71a429973a03aa60dd72ab056e" have entirely different histories.

2 changed files with 30 additions and 25 deletions

View File

@ -10,28 +10,25 @@ $:
- name: init - name: init
script: npm install pnpm -g && pnpm i script: npm install pnpm -g && pnpm i
main: main:
push:
- imports: https://cnb.cool/risenstars/iot-env/-/blob/main/env.yml
stages:
- name: sync to gitea
image: tencentcom/git-sync
settings:
target_url: https://git.risenstars.com/risenstars/iot-manage-dashboard.git
auth_type: https
username: ${GIT_USERNAME}
password: ${GIT_ACCESS_TOKEN}
web_trigger_test: web_trigger_test:
- docker: - docker:
image: node:24 image: node:24
volumes:
- node_modules
stages: stages:
- name: npm -i - name: build cache image
script: | type: docker:cache
npm install -g pnpm options:
pnpm install --frozen-lockfile dockerfile: cache.dockerfile
pnpm run build:tdesign by:
- package.json
- package-lock.json
versionBy:
- package-lock.json
exports:
name: iot-manage-dashboard
- name: use cache image
image: iot-manage-dashboard
commands:
- cp -r "$NODE_PATH" ./node_modules
web_trigger_prod: web_trigger_prod:
- docker: - docker:
image: node:24 image: node:24

View File

@ -1,15 +1,23 @@
FROM node:22 FROM node:22-slim AS builder
# --max-old-space-size
RUN npm config set registry http://mirrors.cloud.tencent.com/npm/ \ ENV NODE_OPTIONS=--max-old-space-size=8192
&& npm i -g pnpm \ ENV TZ=Asia/Shanghai
&& pnpm config set store-dir /lib/pnpm
WORKDIR /data/cache ENV NODE_PATH=/app/node_modules
COPY . .
RUN pnpm i
WORKDIR /app
# copy package.json and pnpm-lock.yaml to workspace
COPY . /app
RUN npm config set registry https://mirrors.cloud.tencent.com/npm/
RUN npm install -g pnpm@10.14.0
RUN pnpm install --frozen-lockfile
RUN echo "Builder Success 🎉" RUN echo "Builder Success 🎉"