From 9452d748aada20fd062a19af448190f710334361 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=BA=E6=B5=B7=E5=9B=BD?= <404580946@qq.com> Date: Fri, 24 Oct 2025 11:48:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=9A=84=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile.crop-x | 2 +- crop-x/scripts/deploy.js | 42 +++++++++++++++++++++++++++++++++++++++ crop-x/tailwind.config.js | 2 +- 3 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 crop-x/scripts/deploy.js diff --git a/Dockerfile.crop-x b/Dockerfile.crop-x index 9481e46..8bb1a64 100644 --- a/Dockerfile.crop-x +++ b/Dockerfile.crop-x @@ -8,7 +8,7 @@ RUN apk add --no-cache libc6-compat WORKDIR /app # Install dependencies based on the preferred package manager -COPY package.json package-lock.json ./ +COPY crop-x/package.json crop-x/package-lock.json ./ RUN npm ci --registry=https://registry.npmmirror.com/ diff --git a/crop-x/scripts/deploy.js b/crop-x/scripts/deploy.js new file mode 100644 index 0000000..5c9b6d9 --- /dev/null +++ b/crop-x/scripts/deploy.js @@ -0,0 +1,42 @@ +import axios from 'axios'; +var data = JSON.stringify({ + "namespace": "argo", + "template_name": "repo-runtime-workflow", + "parameters": { + "git-schema": "http", + "git-domain": "gitea-service-http.cropflow-dev.svc.cluster.local:3000", + "git-user": "cavin", + "git-repo": "smart-crop-ui", + "git-revision": "main", + "git-pat": "b6c02bf1aec73d7bbbfbe590ea37564a29c4bd5d", + "docker-image-domain": "172.16.102.3:30648", + "docker-dockerfile-path": "./Dockerfile.crop-x", + "resource-cpu-limit": "500m", + "resource-memory-limit": "512Mi", + "resource-gpu-mem-limit": "", + "resource-mount-path": "/data", + "resource-mount-capacity": "", + "app-namespace": "argo", + "app-env-vars": "", + "app-ingress-host": ".dev.maimaiag.com", + "app-container-port": "3000", + "security-scan-enabled": "false" + } +}); + +var config = { + method: 'post', + url: 'https://gitea-admin-argo-workflow-api-app.dev.maimaiag.com/api/v1/workflows/from-template', + headers: { + 'Content-Type': 'application/json' + }, + data : data +}; + +axios(config) +.then(function (response) { + console.log(JSON.stringify(response.data)); +}) +.catch(function (error) { + console.log(error); +}); diff --git a/crop-x/tailwind.config.js b/crop-x/tailwind.config.js index 5590e00..7c16e08 100644 --- a/crop-x/tailwind.config.js +++ b/crop-x/tailwind.config.js @@ -107,5 +107,5 @@ export default { } } }, - plugins: [require("tailwindcss-animate")], + plugins: [import("tailwindcss-animate")], } \ No newline at end of file