Files
aiops/frontend
attacker 2a0521340f feat: 三种部署方式全部验证通过
方案1: docker-compose 双容器(原有,不变)
方案2: 二进制部署(go:embed 前端嵌入)
  - 修复 SPA fallback(c.FileFromFS 301 → c.Data 直接返回)
  - 二进制 22MB,内存 21.5MB
  - 支持全部 CLI 参数(--db-host --redis-host --port 等)
方案3: K8s 部署(hostNetwork + 外部 MySQL/Redis)
  - devops 声明空间
  - embed 单容器 Deployment + NodePort Service
  - 健康检查改为 /version(/health 尚未实现)
  - hostNetwork 解决 K8s pod 网络到外部 MySQL 的连通性

新增: Dockerfile.embed, docker-compose.embed.yml, deploy/binary/
2026-06-21 15:03:17 +08:00
..

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...

      // Remove tseslint.configs.recommended and replace with this
      tseslint.configs.recommendedTypeChecked,
      // Alternatively, use this for stricter rules
      tseslint.configs.strictTypeChecked,
      // Optionally, add this for stylistic rules
      tseslint.configs.stylisticTypeChecked,

      // Other configs...
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])

You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:

// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...
      // Enable lint rules for React
      reactX.configs['recommended-typescript'],
      // Enable lint rules for React DOM
      reactDom.configs.recommended,
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])