From 22168fb9d7a00286bfebc9d02f9fd0339bb43338 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BA=84=E5=BB=BA=E5=9B=BD?= <9340100@qq.com> Date: Sun, 15 Dec 2024 16:35:16 +0000 Subject: [PATCH] "@builder6/server": "^0.2.3" --- deploy/enterprise/Dockerfile | 6 +++--- deploy/enterprise/app/{plugins => builder6}/package.json | 4 ++-- deploy/enterprise/app/{plugins => builder6}/startup.sh | 4 ++-- deploy/enterprise/docker-compose.yml | 3 +++ .../fs/opt/steedos/templates/supervisord/api.conf | 2 +- 5 files changed, 11 insertions(+), 8 deletions(-) rename deploy/enterprise/app/{plugins => builder6}/package.json (51%) rename deploy/enterprise/app/{plugins => builder6}/startup.sh (72%) diff --git a/deploy/enterprise/Dockerfile b/deploy/enterprise/Dockerfile index e8f3dbb115..79ed6602dc 100644 --- a/deploy/enterprise/Dockerfile +++ b/deploy/enterprise/Dockerfile @@ -89,9 +89,9 @@ WORKDIR /opt/steedos/nodered RUN yarn && yarn cache clean -# plugins -COPY ./app/plugins /opt/steedos/plugins -WORKDIR /opt/steedos/plugins +# builder6 +COPY ./app/builder6 /opt/steedos/builder6 +WORKDIR /opt/steedos/builder6 RUN bash -c ". $NVM_DIR/nvm.sh && nvm use 20 && npm i --production" diff --git a/deploy/enterprise/app/plugins/package.json b/deploy/enterprise/app/builder6/package.json similarity index 51% rename from deploy/enterprise/app/plugins/package.json rename to deploy/enterprise/app/builder6/package.json index afe5f14864..9b7aeae456 100644 --- a/deploy/enterprise/app/plugins/package.json +++ b/deploy/enterprise/app/builder6/package.json @@ -1,8 +1,8 @@ { - "name": "steedos-plugins", + "name": "builder6-server", "version": "0.0.0", "license": "MIT", "dependencies": { - "@builder6/mongodb-api": "^0.1.3" + "@builder6/server": "^0.2.3" } } diff --git a/deploy/enterprise/app/plugins/startup.sh b/deploy/enterprise/app/builder6/startup.sh similarity index 72% rename from deploy/enterprise/app/plugins/startup.sh rename to deploy/enterprise/app/builder6/startup.sh index 9c1b131621..65289baa50 100755 --- a/deploy/enterprise/app/plugins/startup.sh +++ b/deploy/enterprise/app/builder6/startup.sh @@ -13,7 +13,7 @@ if [ -z "$NODE_PATH" ]; then fi # 切换到工作目录 -cd /opt/steedos/plugins || exit +cd /opt/steedos/builder6 || exit # 使用 Node.js 14 运行应用 -exec "$NODE_PATH" ./node_modules/@builder6/mongodb-api/dist/main.js \ No newline at end of file +exec "$NODE_PATH" ./node_modules/@builder6/server/dist/b6.server.js -u "$STEEDOS_STORAGE_DIR/builder6" \ No newline at end of file diff --git a/deploy/enterprise/docker-compose.yml b/deploy/enterprise/docker-compose.yml index 9445ff4391..ac95757b1a 100644 --- a/deploy/enterprise/docker-compose.yml +++ b/deploy/enterprise/docker-compose.yml @@ -31,6 +31,9 @@ services: - NPM_CACHE_PACKAGE_CONTENT=true - NPM_REGISTRY_URL=https://registry.npmmirror.com - STEEDOS_WIDGETS_ADDITIONAL=@steedos-widgets/liveblocks + - B6_PLUGIN_PACKAGES=@builder6/node-red,lodash + - B6_PLUGIN_SERVICES=@builder6/node-red + - B6_PLUGIN_NPMRC=registry=https://registry.npmmirror.com tty: true volumes: - "./steedos-storage:/steedos-storage" diff --git a/deploy/enterprise/fs/opt/steedos/templates/supervisord/api.conf b/deploy/enterprise/fs/opt/steedos/templates/supervisord/api.conf index d22105de78..db8abd795c 100644 --- a/deploy/enterprise/fs/opt/steedos/templates/supervisord/api.conf +++ b/deploy/enterprise/fs/opt/steedos/templates/supervisord/api.conf @@ -1,6 +1,6 @@ [program:api] directory=/app/ -command=/opt/steedos/run-with-env.sh /opt/steedos/plugins/startup.sh +command=/opt/steedos/run-with-env.sh /opt/steedos/builder6/startup.sh priority=15 autostart=true autorestart=true