From 046c7c5ccc2160010698a262aae9c632b78351d4 Mon Sep 17 00:00:00 2001 From: nopast <490964186@qq.com> Date: Fri, 12 May 2023 10:17:29 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20nodejs=E8=84=9A=E6=9C=AC=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E8=AF=B7=E6=B1=82=E5=BA=93=E5=8F=8Ahtml=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E5=B7=A5=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/Dockerfile | 2 +- docker/Dockerfile.dev | 2 +- docker/api/func.js | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 4533aed..11804a9 100755 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -46,7 +46,7 @@ RUN sed -i "/wait ${proxy_pid}/i if [ -n \"\$VNC_PASSWORD\" ]; then sed -i \"s/W RUN sed -i "/wait ${proxy_pid}/i if [ -n \"\$VIEW_ONLY\" ]; then sed -i \"s/UI.rfb.viewOnly = UI.getSetting('view_only');/UI.rfb.viewOnly = \$VIEW_ONLY;/\" /checkchan/noVNC/app/ui.js; fi" /checkchan/noVNC/utils/novnc_proxy RUN sed -i -- "s/ps -p/ps -o pid | grep/g" /checkchan/noVNC/utils/novnc_proxy -RUN npm install -g pm2 ts-node typescript '@types/node' nodemon +RUN npm install -g pm2 ts-node typescript '@types/node' nodemon axios cheerio COPY api /checkchan/api RUN cd /checkchan/api/ && npm install diff --git a/docker/Dockerfile.dev b/docker/Dockerfile.dev index 61d4120..e8235f5 100644 --- a/docker/Dockerfile.dev +++ b/docker/Dockerfile.dev @@ -40,7 +40,7 @@ RUN sed -i "/wait ${proxy_pid}/i if [ -n \"\$VNC_PASSWORD\" ]; then sed -i \"s/W RUN sed -i "/wait ${proxy_pid}/i if [ -n \"\$VIEW_ONLY\" ]; then sed -i \"s/UI.rfb.viewOnly = UI.getSetting('view_only');/UI.rfb.viewOnly = \$VIEW_ONLY;/\" /checkchan/noVNC/app/ui.js; fi" /checkchan/noVNC/utils/novnc_proxy RUN sed -i -- "s/ps -p/ps -o pid | grep/g" /checkchan/noVNC/utils/novnc_proxy -RUN npm install -g pm2 ts-node typescript '@types/node' nodemon +RUN npm install -g pm2 ts-node typescript '@types/node' nodemon axios cheerio # COPY api /checkchan/api # RUN cd /checkchan/api/ && npm install diff --git a/docker/api/func.js b/docker/api/func.js index 60b54b5..cd45189 100755 --- a/docker/api/func.js +++ b/docker/api/func.js @@ -455,6 +455,7 @@ async function monitor_shell(item, cookies) const result = await spawnAsync( command, [shell_file], { env: { 'URL':compile_url(url), + 'NODE_PATH':'/usr/local/lib/node_modules', [cookie_name]:cookie_string, ...process.env, } -- Gitee