diff --git a/Dockerfile b/Dockerfile index da69fcc..9aa6cf0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,8 @@ FROM node:16 LABEL authors="kubbo" +RUN yum update -y && yum install -y expect + COPY . /app WORKDIR /app RUN npm i --registry=http://registry.npmmirror.com diff --git a/src/websocket/custom/getZip.js b/src/websocket/custom/getZip.js index 3d71b2c..b02ceed 100644 --- a/src/websocket/custom/getZip.js +++ b/src/websocket/custom/getZip.js @@ -104,8 +104,8 @@ const handleZip = (id, ws) => { const buildPath = { web: 'base-web', wxwork: 'base-wxcp', mp: 'dvcp_v2_wxmp' }[info.type] || {} - let path = `../${buildPath}`, {dist} = info - dist = dist || `../zips/${info.name}v${info.version || "1.0.0"}` + let path = `/${buildPath}`, {dist} = info + dist = dist || `/zips/${info.name}v${info.version || "1.0.0"}` Promise.all([startUpdateSql(), execute(`./shell/update.sh ${info.name} ${path}`, signal)]) .then(cmd => progress.set(30, info?.id)) .then(() => execute(`cd ${path}&&npm run apps&&node bin/pages.js ${id}&&npm run build`, signal))