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