f169afc1bc
新增「其他部署方式」分组,共 5 页: - 方式对比与选型:5 种方式对照、服务依赖表、服务间通信易错点 - 二进制部署:各服务 Go 版本/CGO/构建目录/产物名对照表, admin-svr 需 CGO 的说明,交叉编译限制,systemd unit 模板, 静态前端交给 nginx,升级回滚流程 - 自建镜像:各仓 Dockerfile 位置与构建上下文、构建参数、 镜像命名规则、批量构建脚本、常见问题 - 分离部署:中间件独立,业务机精简 compose,配置改为外部地址 - 离线部署:镜像导出导入、校验、内网镜像仓库方案 同时记录一个实际阻塞:openapi/app/admin-ui 共 5 个 Dockerfile 的 FROM 仍指向私有镜像仓库,外部环境无法构建,页内给出替换方法。
163 lines
5.3 KiB
TypeScript
163 lines
5.3 KiB
TypeScript
import { defineConfig } from 'vitepress'
|
|
|
|
const webManualItems = [
|
|
{ text: '快速开始', link: '/manual/web/' },
|
|
{ text: '首页与通用操作', link: '/manual/web/home' },
|
|
{ text: '卡信息', link: '/manual/web/card-info' },
|
|
{ text: '智能诊断', link: '/manual/web/intelligent-diagnosis' },
|
|
{ text: '业务受理与达量断网', link: '/manual/web/business-operations' },
|
|
{ text: '套餐配置与定价', link: '/manual/web/packages-and-pricing' },
|
|
{ text: '预警管理', link: '/manual/web/warnings' },
|
|
{ text: '入库、库存与出库', link: '/manual/web/inventory' },
|
|
{ text: '通道与接入管理', link: '/manual/web/channels' },
|
|
{ text: '企业、用户与角色', link: '/manual/web/enterprise-management' },
|
|
{ text: '工单管理', link: '/manual/web/work-orders' },
|
|
{ text: 'API 凭证与执行日志', link: '/manual/web/api-and-logs' },
|
|
]
|
|
|
|
const miniProgramManualItems = [
|
|
{ text: '快速开始', link: '/manual/mini-program/' },
|
|
{ text: '首页公开查卡', link: '/manual/mini-program/home' },
|
|
{ text: '公开卡片详情', link: '/manual/mini-program/devices' },
|
|
{ text: '卡片排查', link: '/manual/mini-program/diagnosis' },
|
|
{ text: '登录后办理概览', link: '/manual/mini-program/business' },
|
|
{ text: '客户管理与卡片划拨', link: '/manual/mini-program/customers-and-allocation' },
|
|
{ text: '工单服务', link: '/manual/mini-program/work-orders' },
|
|
{ text: '批次执行日志', link: '/manual/mini-program/execution-logs' },
|
|
{ text: '消息与个人中心', link: '/manual/mini-program/messages-and-profile' },
|
|
]
|
|
|
|
function manualSidebar(_active: 'web' | 'mini' | 'both' = 'both') {
|
|
return [
|
|
{
|
|
text: 'Web端',
|
|
collapsed: false,
|
|
items: webManualItems,
|
|
},
|
|
{
|
|
text: '小程序端',
|
|
collapsed: false,
|
|
items: miniProgramManualItems,
|
|
},
|
|
]
|
|
}
|
|
|
|
export default defineConfig({
|
|
srcDir: './docs',
|
|
base: '/docs/',
|
|
title: 'iotLCM',
|
|
description: 'iotLCM documentation center',
|
|
lang: 'zh-CN',
|
|
cleanUrls: true,
|
|
lastUpdated: false,
|
|
head: [
|
|
['link', { rel: 'icon', type: 'image/png', href: '/docs/favicon.png' }]
|
|
],
|
|
vite: {
|
|
plugins: [
|
|
{
|
|
name: 'serve-root-favicon-in-dev',
|
|
configureServer(server) {
|
|
server.middlewares.use('/favicon.ico', (_request, response) => {
|
|
response.writeHead(302, { Location: '/docs/favicon.png' })
|
|
response.end()
|
|
})
|
|
}
|
|
}
|
|
]
|
|
},
|
|
themeConfig: {
|
|
logo: undefined,
|
|
nav: [
|
|
{ text: '文档首页', link: '/' },
|
|
{ text: '使用手册', link: '/manual/' },
|
|
{ text: 'OpenAPI', link: '/openapi/' },
|
|
{ text: '共享 Token 接口', link: '/openapi/operator/shared-token/' },
|
|
{ text: '部署手册', link: '/deploy/' }
|
|
],
|
|
sidebar: {
|
|
'/deploy/': [
|
|
{
|
|
text: '部署手册',
|
|
collapsed: false,
|
|
items: [
|
|
{ text: '部署概览', link: '/deploy/' },
|
|
{ text: '环境准备', link: '/deploy/prerequisites' },
|
|
{ text: '配置说明', link: '/deploy/configuration' },
|
|
{ text: '启动与验证', link: '/deploy/install' },
|
|
]
|
|
},
|
|
{
|
|
text: '其他部署方式',
|
|
collapsed: false,
|
|
items: [
|
|
{ text: '方式对比与选型', link: '/deploy/alternatives' },
|
|
{ text: '二进制部署', link: '/deploy/binary' },
|
|
{ text: '自建镜像', link: '/deploy/build-image' },
|
|
{ text: '分离部署', link: '/deploy/split' },
|
|
{ text: '离线部署', link: '/deploy/offline' },
|
|
]
|
|
},
|
|
{
|
|
text: '运维',
|
|
collapsed: false,
|
|
items: [
|
|
{ text: '可选服务', link: '/deploy/optional' },
|
|
{ text: '升级与备份', link: '/deploy/operations' },
|
|
{ text: '故障排查', link: '/deploy/troubleshooting' },
|
|
]
|
|
},
|
|
],
|
|
'/manual/': manualSidebar(),
|
|
'/manual/web/': manualSidebar('web'),
|
|
'/manual/mini-program/': manualSidebar('mini'),
|
|
'/openapi/operator/': [
|
|
{
|
|
text: '共享 Token 接口',
|
|
collapsed: false,
|
|
items: [
|
|
{ text: '概览', link: '/openapi/operator/' },
|
|
{ text: '共享 Token 接口', link: '/openapi/operator/shared-token/' },
|
|
{ text: '白名单转发', link: '/openapi/operator/mobile-v5/' },
|
|
]
|
|
},
|
|
],
|
|
'/openapi/': [
|
|
{
|
|
text: 'V3 接口',
|
|
collapsed: false,
|
|
items: [
|
|
{ text: '概览与鉴权', link: '/openapi/v3/' },
|
|
{ text: '获取调用凭证', link: '/openapi/v3/token' },
|
|
{ text: '查询类', link: '/openapi/v3/query' },
|
|
{ text: '业务类', link: '/openapi/v3/common' },
|
|
]
|
|
},
|
|
{
|
|
text: '旧版兼容接口',
|
|
collapsed: false,
|
|
items: [
|
|
{ text: '概览与鉴权', link: '/openapi/legacy/' },
|
|
{ text: '查询类', link: '/openapi/legacy/query' },
|
|
]
|
|
},
|
|
]
|
|
},
|
|
outline: {
|
|
level: [2, 3],
|
|
label: '本页目录'
|
|
},
|
|
docFooter: {
|
|
prev: '上一页',
|
|
next: '下一页'
|
|
},
|
|
search: {
|
|
provider: 'local'
|
|
},
|
|
footer: {
|
|
message: 'iotLCM 文档中心',
|
|
copyright: ''
|
|
}
|
|
}
|
|
})
|