## React SPA Dashboard - React 19 + Vite 7 + Tailwind CSS 4 + Recharts 2 SPA 구축 - Dashboard (배치현황/시스템메트릭/캐시/처리량) + JobMonitor (이력조회/Step상세) - i18n 다국어(ko/en) 시스템, Light/Dark 테마 CSS 토큰 전환 - frontend-maven-plugin 1.15.1 (mvn package 시 자동 빌드) - WebViewController SPA forward + context-path /signal-batch - 레거시 HTML 48개 파일 전체 삭제 ## 안전 배포 - VesselBatchScheduler @PreDestroy: 신규 Job 차단 + 실행 중 Job 완료 대기 - server.shutdown=graceful, timeout-per-shutdown-phase=3m - deploy.yml: 활성 Job 3초 연속 확인 후 stop → 교체 → start - signal-batch.service TimeoutStopSec 60→180 - scripts/deploy.sh: 수동 배포용 안전 스크립트 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
28 lines
951 B
TypeScript
28 lines
951 B
TypeScript
import { defineConfig, loadEnv } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
|
|
export default defineConfig(({ mode }) => {
|
|
const env = loadEnv(mode, process.cwd(), '')
|
|
const BASE_URL = env.VITE_BASE_URL || '/signal-batch'
|
|
|
|
return {
|
|
plugins: [react(), tailwindcss()],
|
|
server: {
|
|
port: 5173,
|
|
proxy: {
|
|
[`${BASE_URL}/api`]: { target: 'http://localhost:8090', changeOrigin: true },
|
|
[`${BASE_URL}/admin`]: { target: 'http://localhost:8090', changeOrigin: true },
|
|
[`${BASE_URL}/monitor`]: { target: 'http://localhost:8090', changeOrigin: true },
|
|
[`${BASE_URL}/actuator`]: { target: 'http://localhost:8090', changeOrigin: true },
|
|
[`${BASE_URL}/ws-tracks`]: { target: 'ws://localhost:8090', ws: true },
|
|
},
|
|
},
|
|
base: `${BASE_URL}/`,
|
|
build: {
|
|
outDir: '../src/main/resources/static',
|
|
emptyOutDir: true,
|
|
},
|
|
}
|
|
})
|