build: 前端应用部署。
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
CI / CI OK (push) Has been cancelled
Deploy Website on push / Rerun on failure (push) Has been cancelled
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
CI / CI OK (push) Has been cancelled
Deploy Website on push / Rerun on failure (push) Has been cancelled
This commit is contained in:
21
apps/web-antd/Dockerfile
Normal file
21
apps/web-antd/Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
||||
FROM node:lts-alpine AS base
|
||||
ENV PNPM_HOME="/pnpm"
|
||||
ENV PATH="$PNPM_HOME:$PATH"
|
||||
ENV NODE_ENV=production
|
||||
ARG NPM_CONFIG_REGISTRY=https://registry.npmmirror.com
|
||||
RUN npm config set registry ${NPM_CONFIG_REGISTRY}
|
||||
RUN corepack enable
|
||||
WORKDIR /app
|
||||
|
||||
FROM base AS builder
|
||||
COPY . .
|
||||
RUN pnpm i --frozen-lockfile
|
||||
ARG RELATIVE_PATH=/
|
||||
ARG BASE_URI=
|
||||
RUN pnpm run build:antd -- --base=${RELATIVE_PATH}${BASE_URI}
|
||||
|
||||
FROM nginx:stable-alpine
|
||||
ARG BASE_URI=
|
||||
COPY --from=builder /app/apps/web-antd/dist /usr/share/nginx/html/${BASE_URI}
|
||||
COPY --from=builder /app/scripts/deploy/nginx.conf /etc/nginx/nginx.conf
|
||||
EXPOSE 8080
|
||||
39
apps/web-antd/Jenkinsfile
vendored
Normal file
39
apps/web-antd/Jenkinsfile
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env groovy
|
||||
pipeline {
|
||||
agent any
|
||||
stages {
|
||||
stage('build') {
|
||||
steps {
|
||||
script {
|
||||
file_contents = '''
|
||||
VITE_GLOB_API_URL=/ruoyi-vue-pro
|
||||
'''
|
||||
write_file_path = "apps/web-antd/.env.production.local"
|
||||
writeFile file: write_file_path, text: file_contents, encoding: 'UTF-8'
|
||||
}
|
||||
script{
|
||||
sh "docker build -f apps/web-antd/Dockerfile --build-arg BASE_URI=yudao-ui-admin/ -t $IMAGE_PATH ."
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('deploy') {
|
||||
steps {
|
||||
script{
|
||||
sh 'docker push $IMAGE_PATH'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
success {
|
||||
sh """
|
||||
curl -X POST "${params.API_URL}/success"
|
||||
"""
|
||||
}
|
||||
failure {
|
||||
sh """
|
||||
curl -X POST "${params.API_URL}/failure"
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,2 +1,2 @@
|
||||
export { default as Tinyflow } from './tinyflow.vue';
|
||||
export { default as Tinyflow } from './Tinyflow.vue';
|
||||
export * from './ui/typing';
|
||||
|
||||
@@ -10,7 +10,7 @@ import { isNumber } from '@vben/utils';
|
||||
import { Button, Input, Select } from 'ant-design-vue';
|
||||
|
||||
import { testWorkflow } from '#/api/ai/workflow';
|
||||
import { Tinyflow } from '#/components/tinyflow';
|
||||
import { Tinyflow } from '#/components/Tinyflow';
|
||||
|
||||
defineProps<{
|
||||
provider: any;
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
import { defineConfig } from '@vben/vite-config';
|
||||
import { loadEnv } from 'vite';
|
||||
|
||||
export default defineConfig(async () => {
|
||||
export default defineConfig(async ({ mode }) => {
|
||||
const env = loadEnv(mode, process.cwd());
|
||||
return {
|
||||
application: {},
|
||||
vite: {
|
||||
server: {
|
||||
proxy: {
|
||||
'/admin-api': {
|
||||
[env.VITE_GLOB_API_URL]: {
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/admin-api/, ''),
|
||||
// mock代理目标地址
|
||||
target: 'http://localhost:48080/admin-api',
|
||||
target: env.VITE_BASE_URL,
|
||||
ws: true,
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user