├── .gitattributes ├── .gitignore ├── .vscode └── launch.json ├── README.md ├── deploy ├── deploy.sh ├── devops-mimi.sql ├── docker-compose-mimi.yaml └── docker-compose-mysql.yaml ├── mimi-ui ├── .editorconfig ├── .env.development ├── .env.production ├── .env.staging ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── Dockerfile ├── LICENSE ├── babel.config.js ├── build │ └── index.js ├── default.conf ├── jest.config.js ├── jsconfig.json ├── package.json ├── plop-templates │ ├── component │ │ ├── index.hbs │ │ └── prompt.js │ ├── store │ │ ├── index.hbs │ │ └── prompt.js │ ├── utils.js │ └── view │ │ ├── index.hbs │ │ └── prompt.js ├── plopfile.js ├── postcss.config.js ├── public │ ├── favicon.ico │ ├── index.html │ └── webmini.svg ├── src │ ├── App.vue │ ├── api │ │ ├── cmdb │ │ │ ├── node.js │ │ │ └── node_group.js │ │ ├── dashboards │ │ │ └── dashboard.js │ │ ├── example │ │ │ └── cloudAccount.js │ │ ├── exec │ │ │ ├── cron.js │ │ │ ├── run_manage.js │ │ │ ├── script.js │ │ │ └── task.js │ │ ├── nav │ │ │ └── nav.js │ │ └── system │ │ │ ├── api.js │ │ │ ├── base.js │ │ │ ├── group.js │ │ │ ├── menu.js │ │ │ ├── operationLog.js │ │ │ ├── role.js │ │ │ └── user.js │ ├── assets │ │ ├── 401_images │ │ │ └── 401.gif │ │ ├── 404_images │ │ │ ├── 404.png │ │ │ └── 404_cloud.png │ │ ├── backgd-image │ │ │ └── login.png │ │ ├── custom-theme │ │ │ ├── fonts │ │ │ │ ├── element-icons.ttf │ │ │ │ └── element-icons.woff │ │ │ └── index.css │ │ ├── iconfont │ │ │ └── font │ │ │ │ ├── demo.css │ │ │ │ ├── demo_index.html │ │ │ │ ├── iconfont.css │ │ │ │ ├── iconfont.js │ │ │ │ ├── iconfont.json │ │ │ │ ├── iconfont.ttf │ │ │ │ ├── iconfont.woff │ │ │ │ └── iconfont.woff2 │ │ └── sidebar-logo │ │ │ └── webmini.png │ ├── components │ │ ├── Breadcrumb │ │ │ └── index.vue │ │ ├── Echarts │ │ │ ├── BarChart.vue │ │ │ ├── PieChart.vue │ │ │ └── RadarChart.vue │ │ ├── ErrorLog │ │ │ └── index.vue │ │ ├── GithubCorner │ │ │ └── index.vue │ │ ├── Hamburger │ │ │ └── index.vue │ │ ├── HeaderSearch │ │ │ └── index.vue │ │ ├── IconSelect │ │ │ ├── index.vue │ │ │ └── requireIcons.js │ │ ├── ImageCropper │ │ │ ├── index.vue │ │ │ └── utils │ │ │ │ ├── data2blob.js │ │ │ │ ├── effectRipple.js │ │ │ │ ├── language.js │ │ │ │ └── mimes.js │ │ ├── JsonEditor │ │ │ └── index.vue │ │ ├── LetterAvater │ │ │ └── index.vue │ │ ├── MDinput │ │ │ └── index.vue │ │ ├── Pagination │ │ │ └── index.vue │ │ ├── PanThumb │ │ │ └── index.vue │ │ ├── RightPanel │ │ │ └── index.vue │ │ ├── Screenfull │ │ │ └── index.vue │ │ ├── Share │ │ │ └── DropdownMenu.vue │ │ ├── SizeSelect │ │ │ └── index.vue │ │ ├── Sticky │ │ │ └── index.vue │ │ ├── SvgIcon │ │ │ └── index.vue │ │ ├── TextHoverEffect │ │ │ └── Mallki.vue │ │ ├── ThemePicker │ │ │ └── index.vue │ │ ├── Tinymce │ │ │ ├── components │ │ │ │ └── EditorImage.vue │ │ │ ├── dynamicLoadScript.js │ │ │ ├── index.vue │ │ │ ├── plugins.js │ │ │ └── toolbar.js │ │ ├── Upload │ │ │ ├── SingleImage.vue │ │ │ ├── SingleImage2.vue │ │ │ └── SingleImage3.vue │ │ └── UploadExcel │ │ │ └── index.vue │ ├── directive │ │ ├── clipboard │ │ │ ├── clipboard.js │ │ │ └── index.js │ │ ├── el-drag-dialog │ │ │ ├── drag.js │ │ │ └── index.js │ │ ├── el-table │ │ │ ├── adaptive.js │ │ │ └── index.js │ │ ├── permission │ │ │ ├── index.js │ │ │ └── permission.js │ │ ├── sticky.js │ │ └── waves │ │ │ ├── index.js │ │ │ ├── waves.css │ │ │ └── waves.js │ ├── filters │ │ └── index.js │ ├── icons │ │ ├── index.js │ │ ├── svg │ │ │ ├── 404.svg │ │ │ ├── alibabacloud.svg │ │ │ ├── bug.svg │ │ │ ├── build.svg │ │ │ ├── calendar.svg │ │ │ ├── cascader.svg │ │ │ ├── chart.svg │ │ │ ├── checkbox.svg │ │ │ ├── clipboard.svg │ │ │ ├── code.svg │ │ │ ├── color.svg │ │ │ ├── component.svg │ │ │ ├── dashboard.svg │ │ │ ├── date-range.svg │ │ │ ├── date.svg │ │ │ ├── dict.svg │ │ │ ├── documentation.svg │ │ │ ├── download.svg │ │ │ ├── drag copy.svg │ │ │ ├── drag.svg │ │ │ ├── druid.svg │ │ │ ├── edit.svg │ │ │ ├── education.svg │ │ │ ├── email.svg │ │ │ ├── example.svg │ │ │ ├── excel.svg │ │ │ ├── exit-fullscreen.svg │ │ │ ├── eye-open.svg │ │ │ ├── eye.svg │ │ │ ├── form.svg │ │ │ ├── fullscreen.svg │ │ │ ├── github.svg │ │ │ ├── guide.svg │ │ │ ├── heart.svg │ │ │ ├── icon.svg │ │ │ ├── input.svg │ │ │ ├── international.svg │ │ │ ├── job.svg │ │ │ ├── language.svg │ │ │ ├── link.svg │ │ │ ├── list.svg │ │ │ ├── lock.svg │ │ │ ├── log.svg │ │ │ ├── logininfor.svg │ │ │ ├── message.svg │ │ │ ├── money.svg │ │ │ ├── monitor.svg │ │ │ ├── nested.svg │ │ │ ├── network.svg │ │ │ ├── number.svg │ │ │ ├── online.svg │ │ │ ├── pass.svg │ │ │ ├── password.svg │ │ │ ├── pdf.svg │ │ │ ├── people.svg │ │ │ ├── peoples.svg │ │ │ ├── phone.svg │ │ │ ├── post.svg │ │ │ ├── qq.svg │ │ │ ├── question.svg │ │ │ ├── radio.svg │ │ │ ├── rate.svg │ │ │ ├── row.svg │ │ │ ├── search.svg │ │ │ ├── select.svg │ │ │ ├── server.svg │ │ │ ├── shopping.svg │ │ │ ├── size.svg │ │ │ ├── skill.svg │ │ │ ├── slider.svg │ │ │ ├── star.svg │ │ │ ├── swagger.svg │ │ │ ├── switch.svg │ │ │ ├── system.svg │ │ │ ├── tab.svg │ │ │ ├── table.svg │ │ │ ├── tengxunyun.svg │ │ │ ├── textarea.svg │ │ │ ├── theme.svg │ │ │ ├── time-range.svg │ │ │ ├── time.svg │ │ │ ├── tool.svg │ │ │ ├── tree-table.svg │ │ │ ├── tree.svg │ │ │ ├── upload.svg │ │ │ ├── user.svg │ │ │ ├── validCode.svg │ │ │ ├── vip.svg │ │ │ ├── wechat.svg │ │ │ └── zip.svg │ │ └── svgo.yml │ ├── layout │ │ ├── components │ │ │ ├── AppMain.vue │ │ │ ├── Navbar.vue │ │ │ ├── Settings │ │ │ │ └── index.vue │ │ │ ├── Sidebar │ │ │ │ ├── FixiOSBug.js │ │ │ │ ├── Item.vue │ │ │ │ ├── Link.vue │ │ │ │ ├── Logo.vue │ │ │ │ ├── SidebarItem.vue │ │ │ │ └── index.vue │ │ │ ├── TagsView │ │ │ │ ├── ScrollPane.vue │ │ │ │ └── index.vue │ │ │ └── index.js │ │ ├── index.vue │ │ └── mixin │ │ │ └── ResizeHandler.js │ ├── main.js │ ├── permission.js │ ├── router │ │ └── index.js │ ├── settings.js │ ├── store │ │ ├── getters.js │ │ ├── index.js │ │ └── modules │ │ │ ├── app.js │ │ │ ├── errorLog.js │ │ │ ├── permission.js │ │ │ ├── settings.js │ │ │ ├── tagsView.js │ │ │ └── user.js │ ├── styles │ │ ├── btn.scss │ │ ├── element-ui.scss │ │ ├── element-variables.scss │ │ ├── index.scss │ │ ├── mixin.scss │ │ ├── sidebar.scss │ │ ├── transition.scss │ │ └── variables.scss │ ├── utils │ │ ├── auth.js │ │ ├── clipboard.js │ │ ├── error-log.js │ │ ├── get-page-title.js │ │ ├── index.js │ │ ├── open-window.js │ │ ├── permission.js │ │ ├── request.js │ │ ├── scroll-to.js │ │ └── validate.js │ ├── vendor │ │ ├── Export2Excel.js │ │ └── Export2Zip.js │ └── views │ │ ├── cmdb │ │ └── node │ │ │ ├── index copy.vue │ │ │ └── index.vue │ │ ├── dashboard │ │ ├── components │ │ │ ├── LineChart.vue │ │ │ ├── PanelGroup.vue │ │ │ └── mixins │ │ │ │ └── resize.js │ │ └── index.vue │ │ ├── error-page │ │ ├── 401.vue │ │ └── 404.vue │ │ ├── example │ │ └── cloudAccount │ │ │ └── index.vue │ │ ├── exec │ │ ├── cron │ │ │ ├── index.vue │ │ │ ├── list │ │ │ │ ├── index copy.vue │ │ │ │ └── index.vue │ │ │ └── log │ │ │ │ └── index.vue │ │ ├── script │ │ │ ├── command │ │ │ │ ├── index copy.vue │ │ │ │ └── index.vue │ │ │ ├── index.vue │ │ │ ├── library │ │ │ │ ├── index copy.vue │ │ │ │ ├── index.vue │ │ │ │ └── info │ │ │ │ │ └── index.vue │ │ │ └── script_log │ │ │ │ └── index.vue │ │ ├── task │ │ │ ├── index.vue │ │ │ └── manage │ │ │ │ ├── add │ │ │ │ ├── index copy.vue │ │ │ │ └── index.vue │ │ │ │ ├── index copy.vue │ │ │ │ ├── index.vue │ │ │ │ ├── info │ │ │ │ ├── index copy.vue │ │ │ │ └── index.vue │ │ │ │ ├── manage_log │ │ │ │ └── index.vue │ │ │ │ └── update │ │ │ │ ├── index copy.vue │ │ │ │ └── index.vue │ │ └── transfer │ │ │ ├── index copy.vue │ │ │ └── index.vue │ │ ├── groupUser │ │ └── userList │ │ │ └── index.vue │ │ ├── login │ │ └── index.vue │ │ ├── nav │ │ ├── index copy.vue │ │ ├── index.vue │ │ └── info │ │ │ └── info.vue │ │ ├── profile │ │ ├── components │ │ │ ├── Account.vue │ │ │ └── UserCard.vue │ │ └── index.vue │ │ ├── redirect │ │ └── index.vue │ │ └── system │ │ ├── api │ │ └── index.vue │ │ ├── group │ │ └── index.vue │ │ ├── log │ │ ├── index.vue │ │ └── operationLog │ │ │ └── index.vue │ │ ├── menu │ │ └── index.vue │ │ ├── role │ │ └── index.vue │ │ └── user │ │ └── index.vue ├── tests │ └── unit │ │ ├── .eslintrc.js │ │ ├── components │ │ ├── Hamburger.spec.js │ │ └── SvgIcon.spec.js │ │ └── utils │ │ ├── formatTime.spec.js │ │ ├── param2Obj.spec.js │ │ ├── parseTime.spec.js │ │ └── validate.spec.js └── vue.config.js └── server ├── Dockerfile ├── config ├── config.go ├── config.yml ├── mimi-priv.pem ├── mimi-pub.pem └── rbac_model.conf ├── controller ├── a_enter.go ├── cmdb │ ├── a_enter.go │ ├── agent.go │ ├── node_controller.go │ └── node_group_controller.go ├── example │ ├── a_enter.go │ └── example_cloud_account_controller.go ├── exec │ ├── a_enter.go │ ├── cron_controller.go │ ├── cron_log_controller.go │ ├── run_task_manage_controller.go │ ├── script_controller.go │ ├── script_library_controller.go │ ├── task_manage_controller.go │ └── transfer_controller.go ├── nav │ ├── a_enter.go │ ├── link_controller.go │ └── nav_controller.go └── system │ ├── a_enter.go │ ├── system_api_controller.go │ ├── system_base_controller.go │ ├── system_group_controller.go │ ├── system_menu_controller.go │ ├── system_operation_log_controller.go │ ├── system_role_controller.go │ └── system_user_controller.go ├── go.mod ├── go.sum ├── logic ├── a_enter.go ├── cmdb │ ├── a_enter.go │ ├── agent_logic.go │ ├── node_group_logic.go │ └── node_logic.go ├── example │ ├── a_enter.go │ └── example_cloud_account_logic.go ├── exec_logic │ ├── a_enter.go │ ├── cron_log_logic.go │ ├── cron_logic.go │ ├── cron_run.go │ ├── run_task_manage_logic copy.go │ ├── run_task_manage_logic.go │ ├── script_library_logic.go │ ├── script_logic.go │ ├── task_manage_logic.go │ └── transfer_logic.go ├── nav │ ├── a_enter.go │ ├── link_logic.go │ └── nav_logic.go └── system │ ├── a_enter.go │ ├── system_api_logic.go │ ├── system_base_logic.go │ ├── system_group_logic.go │ ├── system_menu_logic.go │ ├── system_operation_log_logic.go │ ├── system_role_logic.go │ └── system_user_logic.go ├── logs ├── error │ ├── 2025-03-27.log │ └── 2025-03-31.log └── info │ ├── 2025-03-27.log │ ├── 2025-03-31.log │ ├── 2025-04-01.log │ ├── 2025-04-02.log │ ├── 2025-04-03.log │ ├── 2025-04-07.log │ ├── 2025-04-08.log │ ├── 2025-04-09.log │ ├── 2025-04-14.log │ ├── 2025-04-15.log │ ├── 2025-04-16.log │ ├── 2025-04-17.log │ ├── 2025-04-18.log │ ├── 2025-04-21.log │ ├── 2025-04-22.log │ ├── 2025-04-23.log │ ├── 2025-04-25.log │ ├── 2025-04-27.log │ ├── 2025-04-28.log │ ├── 2025-04-30.log │ ├── 2025-05-06.log │ ├── 2025-05-07.log │ ├── 2025-05-09.log │ ├── 2025-05-12.log │ ├── 2025-05-13.log │ └── 2025-05-14.log ├── main.go ├── middleware ├── AuthMiddleware.go ├── CORSMiddleware.go ├── CasbinMiddleware.go ├── OperationLogMiddleware.go └── RateLimitMiddleware.go ├── model ├── cmdb │ ├── agent.go │ ├── node.go │ ├── request │ │ ├── agent_req.go │ │ └── node_req.go │ └── response │ │ ├── agent_rsp.go │ │ └── node_rsp.go ├── example │ ├── cloudaccount.go │ ├── request │ │ └── example_cloud_account_req.go │ └── response │ │ └── example_cloud_account_rsp.go ├── exec │ ├── exec.go │ ├── request │ │ ├── cron_req.go │ │ ├── script_library_req.go │ │ ├── script_log_req.go │ │ ├── task_manage_log_req.go │ │ ├── task_manage_req.go │ │ └── transfer_req.go │ └── response │ │ ├── cron_rsp.go │ │ ├── scrip_library_rsp.go │ │ ├── scrip_rsp.go │ │ ├── task_manage_rsp.go │ │ └── transfer_rsp.go ├── nav │ ├── nav.go │ ├── request │ │ ├── link_req.go │ │ └── nav_req.go │ └── response │ │ └── nav_rsp.go └── system │ ├── api.go │ ├── casbin.go │ ├── group.go │ ├── menu.go │ ├── operation_log.go │ ├── request │ ├── system_api_req.go │ ├── system_base_req.go │ ├── system_group_req.go │ ├── system_menu_req.go │ ├── system_operation_log_req.go │ ├── system_role_req.go │ └── system_user_req.go │ ├── response │ ├── system_api_rsp.go │ ├── system_base_rsp.go │ ├── system_common_rsp.go │ ├── system_group_rsp.go │ ├── system_menu_rsp.go │ ├── system_operation_log_rsp.go │ ├── system_role_rsp.go │ └── system_user_rsp.go │ ├── role.go │ └── user.go ├── public ├── common │ ├── casbin.go │ ├── cronjob │ │ └── cronjob.go │ ├── database.go │ ├── init_mysql_data.go │ ├── logger.go │ └── validator.go └── tools │ ├── agent.go │ ├── bcrypt_passwd.go │ ├── cron.go │ ├── http.go │ ├── http_doreq.go │ ├── json.go │ ├── pool.go │ ├── rsa.go │ ├── slice_cmp.go │ ├── ssh.go │ ├── time.go │ ├── type.go │ ├── util_test.go │ ├── web.go │ ├── websocket_writer.go │ └── webssh.go ├── routes ├── a_enter.go ├── cmdb │ ├── a_enter.go │ ├── agent_router.go │ ├── node_group_router.go │ └── node_router.go ├── example │ ├── a_enter.go │ └── example_domain_routes.go ├── exec_router │ ├── a_enter.go │ ├── cron_routes.go │ ├── script_library_routes.go │ ├── script_routes.go │ ├── task_manage_routes.go │ └── transfer_routes.go ├── nav │ ├── a_enter.go │ └── example_domain_routes.go └── system │ ├── a_enter.go │ ├── system_api_routes.go │ ├── system_base_routes.go │ ├── system_group_routes.go │ ├── system_menu_routes.go │ ├── system_operation_log_routes.go │ ├── system_role_routes.go │ └── system_user_routes.go ├── service ├── a_enter.go ├── cmdb │ ├── a_enter.go │ ├── agent_group_svc.go │ ├── agent_svc.go │ ├── node_group_svc.go │ └── node_svc.go ├── example │ ├── a_enter.go │ └── example_cloud_account_service.go.go ├── exec_svc │ ├── a_enter.go │ ├── cron_log_service.go │ ├── cron_service.go │ ├── script_library_service.go │ ├── script_log_service.go │ ├── script_service.go │ ├── task_log_service.go │ ├── task_manage_log_service.go │ ├── task_manage_service.go │ └── transfer_service.go ├── nav │ ├── a_enter.go │ ├── link_svc.go │ └── nav_svc.go └── system │ ├── a_enter.go │ ├── system_api_service.go │ ├── system_group_service.go │ ├── system_menu_service.go │ ├── system_operation_log_service.go │ ├── system_role_service.go │ └── system_user_service.go └── test ├── README.md ├── config.yml ├── go-ldap-admin-priv.pem ├── go-ldap-admin-pub.pem ├── isql_test.go ├── rbac_model.conf └── tools_test.go /.gitattributes: -------------------------------------------------------------------------------- 1 | mimi-ui/**/* linguist-vendored 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | mimi-ui/.DS_Store 2 | mimi-ui/node_modules/ 3 | mimi-ui/dist/ 4 | mimi-ui/npm-debug.log* 5 | mimi-ui/yarn-debug.log* 6 | mimi-ui/yarn-error.log* 7 | mimi-ui/**/*.log 8 | mimi-ui/tests/**/coverage/ 9 | mimi-ui/tests/e2e/reports 10 | mimi-ui/selenium-debug.log 11 | mimi-ui/# Editor directories and files 12 | mimi-ui/.idea 13 | mimi-ui/.vscode 14 | mimi-ui/*.suo 15 | mimi-ui/*.ntvs* 16 | mimi-ui/*.njsproj 17 | mimi-ui/*.sln 18 | mimi-ui/*.local 19 | mimi-ui/package-lock.json 20 | mimi-ui/yarn.lock 21 | mimi-ui/.history 22 | server/logs/* 23 | server/*.exe -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // 使用 IntelliSense 了解相关属性。 3 | // 悬停以查看现有属性的描述。 4 | // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "Launch Package", 9 | "type": "go", 10 | "request": "launch", 11 | "mode": "auto", 12 | "program": "${workspaceFolder}/server/main.go" 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /deploy/deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e # 一旦出错立即退出 3 | 4 | echo -e "\033[1;34m[1/5] 构建后端 Go 项目...\033[0m" 5 | if [ -d "../server" ]; then 6 | cd ../server 7 | go env -w GOPROXY=https://goproxy.cn,direct 8 | go mod tidy 9 | CGO_ENABLED=0 go build -o mimi-server 10 | cd - >/dev/null 11 | else 12 | echo -e "\033[0;31m[错误] ../server 目录不存在,构建失败!\033[0m" 13 | exit 1 14 | fi 15 | 16 | echo -e "\033[1;34m[2/5] 构建并启动 MySQL 服务...\033[0m" 17 | docker-compose -f docker-compose-mysql.yaml up -d --build 18 | 19 | echo -e "\033[1;34m[3/5] 构建并启动 mimi 服务...\033[0m" 20 | docker-compose -f docker-compose-mimi.yaml up -d --build 21 | 22 | echo -e "\033[1;34m[4/5] 容器状态检查...\033[0m" 23 | docker-compose -f docker-compose-mimi.yaml ps 24 | 25 | echo -e "\033[1;34m[5/5] 重启异常退出的容器(如有)...\033[0m" 26 | EXITED_CONTAINERS=$(docker-compose -f docker-compose-mimi.yaml ps -q | xargs docker inspect --format '{{.Name}} {{.State.Status}}' | grep "exited" | awk '{print $1}' | sed 's/\///') 27 | if [ -n "$EXITED_CONTAINERS" ]; then 28 | for name in $EXITED_CONTAINERS; do 29 | echo -e "\033[0;33m重启 $name ...\033[0m" 30 | docker-compose -f docker-compose-mimi.yaml restart "$name" 31 | done 32 | else 33 | echo -e "\033[0;32m所有容器运行正常,无需重启。\033[0m" 34 | fi 35 | 36 | echo -e "\033[1;32m✅ 部署完成!\033[0m" 37 | -------------------------------------------------------------------------------- /deploy/docker-compose-mimi.yaml: -------------------------------------------------------------------------------- 1 | version: "3.8" # 推荐使用 3.8 版本,以支持更多特性 2 | 3 | services: 4 | 5 | mimi-server: 6 | build: 7 | context: ../server # 相对于 deploy 目录,指向 server 目录 8 | dockerfile: Dockerfile # 如果 Dockerfile 不同名则写明文件名 9 | image: mimi-server:latest # 可选,指定构建后镜像的 tag 10 | container_name: mimi-server 11 | working_dir: /app 12 | environment: 13 | - TZ=Asia/Shanghai 14 | ports: 15 | - "8888:8888" 16 | depends_on: 17 | - mysql 18 | networks: 19 | - app-network 20 | mimi-ui: 21 | build: 22 | context: ../mimi-ui # 相对于 deploy 目录,指向 server 目录 23 | dockerfile: Dockerfile # 如果 Dockerfile 不同名则写明文件名 24 | image: mimi-ui:latest # 可选,指定构建后镜像的 tag 25 | container_name: mimi-ui 26 | working_dir: /app 27 | environment: 28 | - TZ=Asia/Shanghai 29 | ports: 30 | - "80:80" 31 | depends_on: 32 | - mysql 33 | networks: 34 | - app-network 35 | networks: 36 | app-network: 37 | external: true # ✅ 引用已创建的外部网络 38 | -------------------------------------------------------------------------------- /deploy/docker-compose-mysql.yaml: -------------------------------------------------------------------------------- 1 | version: "3.8" # 推荐使用 3.8 版本,以支持更多特性 2 | 3 | services: 4 | 5 | mysql: 6 | image: registry.cn-shanghai.aliyuncs.com/ss1917/mysql:8.0 7 | restart: always 8 | user: root 9 | privileged: true 10 | volumes: 11 | - /etc/localtime:/etc/localtime:ro 12 | - ./mysql/data:/var/lib/mysql 13 | - ./devops-mimi.sql:/docker-entrypoint-initdb.d/devops-mimi.sql:ro 14 | environment: 15 | - TZ=Asia/Shanghai 16 | - MYSQL_ROOT_PASSWORD=123456 17 | - MYSQL_ROOT_HOST=% 18 | command: 19 | - mysqld 20 | - --bind-address=0.0.0.0 # 强制MySQL监听所有IP(覆盖默认配置) 21 | - --default-authentication-plugin=mysql_native_password # 强制使用旧版插件 22 | - --skip-name-resolve # 跳过DNS解析(提升性能) 23 | container_name: mysql 24 | hostname: mysql 25 | ports: 26 | - "3306:3306" 27 | networks: 28 | - app-network 29 | 30 | networks: 31 | app-network: 32 | name: app-network # ✅ 添加这一行,给 network 显式命名 33 | driver: bridge 34 | -------------------------------------------------------------------------------- /mimi-ui/.editorconfig: -------------------------------------------------------------------------------- 1 | # https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | end_of_line = lf 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | 12 | [*.md] 13 | insert_final_newline = false 14 | trim_trailing_whitespace = false 15 | -------------------------------------------------------------------------------- /mimi-ui/.env.development: -------------------------------------------------------------------------------- 1 | # just a flag 2 | ENV = 'development' 3 | 4 | # base api 5 | VUE_APP_BASE_API = 'http://localhost:8888/' 6 | VUE_APP_WS_API = 'ws://localhost:8888' 7 | # VUE_APP_PUBLIC_KEY="-----BEGIN PUBLIC KEY-----MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDbOYcY8HbDaNM9ooYXoc9s+R5oR05ZL1BsVKadQBgOVH/kj7PQuD+ABEFVgB6rJNi287fRuZeZR+MCoG72H+AYsAhRsEaB5SuI7gDEstXuTyjhx5bz0wUujbDK4VMgRfPO6MQo+A0c95OadDEvEQDG3KBQwLXapv+ZfsjG7NgdawIDAQAB-----END PUBLIC KEY-----" 8 | VUE_APP_PUBLIC_KEY="-----BEGIN PUBLIC KEY-----MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDbOYcY8HbDaNM9ooYXoc9s+R5oR05ZL1BsVKadQBgOVH/kj7PQuD+ABEFVgB6rJNi287fRuZeZR+MCoG72H+AYsAhRsEaB5SuI7gDEstXuTyjhx5bz0wUujbDK4VMgRfPO6MQo+A0c95OadDEvEQDG3KBQwLXapv+ZfsjG7NgdawIDAQAB-----END PUBLIC KEY-----" -------------------------------------------------------------------------------- /mimi-ui/.env.production: -------------------------------------------------------------------------------- 1 | # just a flag 2 | ENV = 'production' 3 | 4 | # base api 5 | VUE_APP_BASE_API = 'http://localhost:8888/' 6 | VUE_APP_WS_API = 'ws://localhost:8888' 7 | VUE_APP_PUBLIC_KEY="-----BEGIN PUBLIC KEY-----MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDbOYcY8HbDaNM9ooYXoc9s+R5oR05ZL1BsVKadQBgOVH/kj7PQuD+ABEFVgB6rJNi287fRuZeZR+MCoG72H+AYsAhRsEaB5SuI7gDEstXuTyjhx5bz0wUujbDK4VMgRfPO6MQo+A0c95OadDEvEQDG3KBQwLXapv+ZfsjG7NgdawIDAQAB-----END PUBLIC KEY-----" 8 | -------------------------------------------------------------------------------- /mimi-ui/.env.staging: -------------------------------------------------------------------------------- 1 | NODE_ENV = production 2 | 3 | # just a flag 4 | ENV = 'staging' 5 | 6 | # base api 7 | VUE_APP_BASE_API = '/stage-api' 8 | 9 | -------------------------------------------------------------------------------- /mimi-ui/.eslintignore: -------------------------------------------------------------------------------- 1 | build/*.js 2 | src/assets 3 | public 4 | dist 5 | -------------------------------------------------------------------------------- /mimi-ui/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | **/*.log 8 | 9 | tests/**/coverage/ 10 | tests/e2e/reports 11 | selenium-debug.log 12 | 13 | # Editor directories and files 14 | .idea 15 | .vscode 16 | *.suo 17 | *.ntvs* 18 | *.njsproj 19 | *.sln 20 | *.local 21 | 22 | package-lock.json 23 | yarn.lock 24 | .history -------------------------------------------------------------------------------- /mimi-ui/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:14.18 AS builder 2 | 3 | RUN mkdir /app 4 | ADD . /app/ 5 | WORKDIR /app 6 | RUN git config --global url."https://".insteadOf git:// \ 7 | && npm install --registry=http://registry.npmmirror.com \ 8 | && yarn build:prod 9 | 10 | FROM openresty/openresty:1.21.4.1-0-centos7 11 | RUN mkdir /app 12 | WORKDIR /app 13 | COPY --from=builder /app/default.conf /etc/nginx/conf.d/default.conf 14 | COPY --from=builder /app/dist . 15 | 16 | CMD nginx -g "daemon off;" -------------------------------------------------------------------------------- /mimi-ui/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017-present qishu321 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /mimi-ui/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | // https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app 4 | '@vue/cli-plugin-babel/preset' 5 | ], 6 | 'env': { 7 | 'development': { 8 | // babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require(). 9 | // This plugin can significantly increase the speed of hot updates, when you have a large number of pages. 10 | // https://panjiachen.github.io/vue-element-admin-site/guide/advanced/lazy-loading.html 11 | 'plugins': ['dynamic-import-node'] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /mimi-ui/build/index.js: -------------------------------------------------------------------------------- 1 | const { run } = require('runjs') 2 | const chalk = require('chalk') 3 | const config = require('../vue.config.js') 4 | const rawArgv = process.argv.slice(2) 5 | const args = rawArgv.join(' ') 6 | 7 | if (process.env.npm_config_preview || rawArgv.includes('--preview')) { 8 | const report = rawArgv.includes('--report') 9 | 10 | run(`vue-cli-service build ${args}`) 11 | 12 | const port = 9526 13 | const publicPath = config.publicPath 14 | 15 | var connect = require('connect') 16 | var serveStatic = require('serve-static') 17 | const app = connect() 18 | 19 | app.use( 20 | publicPath, 21 | serveStatic('./dist', { 22 | index: ['index.html', '/'] 23 | }) 24 | ) 25 | 26 | app.listen(port, function () { 27 | console.log(chalk.green(`> Preview at http://localhost:${port}${publicPath}`)) 28 | if (report) { 29 | console.log(chalk.green(`> Report at http://localhost:${port}${publicPath}report.html`)) 30 | } 31 | 32 | }) 33 | } else { 34 | run(`vue-cli-service build ${args}`) 35 | } 36 | -------------------------------------------------------------------------------- /mimi-ui/default.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | server_name localhost; 4 | 5 | root /app; 6 | 7 | location / { 8 | try_files $uri $uri/ /index.html; 9 | add_header Cache-Control 'no-store'; 10 | 11 | # 添加 CORS 相关头部 12 | add_header 'Access-Control-Allow-Origin' '*' always; 13 | add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, DELETE' always; 14 | add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range' always; 15 | add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range' always; 16 | 17 | # 处理预检请求 18 | if ($request_method = 'OPTIONS') { 19 | return 204; 20 | } 21 | } 22 | location ~* ^(/api/.+?)/\?(.*)$ { 23 | return 301 $1?$2; 24 | } 25 | 26 | } 27 | 28 | -------------------------------------------------------------------------------- /mimi-ui/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | moduleFileExtensions: ['js', 'jsx', 'json', 'vue'], 3 | transform: { 4 | '^.+\\.vue$': 'vue-jest', 5 | '.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$': 6 | 'jest-transform-stub', 7 | '^.+\\.jsx?$': 'babel-jest' 8 | }, 9 | moduleNameMapper: { 10 | '^@/(.*)$': '/src/$1' 11 | }, 12 | snapshotSerializers: ['jest-serializer-vue'], 13 | testMatch: [ 14 | '**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)' 15 | ], 16 | collectCoverageFrom: ['src/utils/**/*.{js,vue}', '!src/utils/auth.js', '!src/utils/request.js', 'src/components/**/*.{js,vue}'], 17 | coverageDirectory: '/tests/unit/coverage', 18 | // 'collectCoverage': true, 19 | 'coverageReporters': [ 20 | 'lcov', 21 | 'text-summary' 22 | ], 23 | testURL: 'http://localhost/' 24 | } 25 | -------------------------------------------------------------------------------- /mimi-ui/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": "./", 4 | "paths": { 5 | "@/*": ["src/*"] 6 | } 7 | }, 8 | "exclude": ["node_modules", "dist"] 9 | } -------------------------------------------------------------------------------- /mimi-ui/plop-templates/component/index.hbs: -------------------------------------------------------------------------------- 1 | {{#if template}} 2 | 5 | {{/if}} 6 | 7 | {{#if script}} 8 | 20 | {{/if}} 21 | 22 | {{#if style}} 23 | 26 | {{/if}} 27 | -------------------------------------------------------------------------------- /mimi-ui/plop-templates/store/index.hbs: -------------------------------------------------------------------------------- 1 | {{#if state}} 2 | const state = {} 3 | {{/if}} 4 | 5 | {{#if mutations}} 6 | const mutations = {} 7 | {{/if}} 8 | 9 | {{#if actions}} 10 | const actions = {} 11 | {{/if}} 12 | 13 | export default { 14 | namespaced: true, 15 | {{options}} 16 | } 17 | -------------------------------------------------------------------------------- /mimi-ui/plop-templates/utils.js: -------------------------------------------------------------------------------- 1 | exports.notEmpty = name => v => 2 | !v || v.trim() === '' ? `${name} is required` : true 3 | -------------------------------------------------------------------------------- /mimi-ui/plop-templates/view/index.hbs: -------------------------------------------------------------------------------- 1 | {{#if template}} 2 | 5 | {{/if}} 6 | 7 | {{#if script}} 8 | 20 | {{/if}} 21 | 22 | {{#if style}} 23 | 26 | {{/if}} 27 | -------------------------------------------------------------------------------- /mimi-ui/plop-templates/view/prompt.js: -------------------------------------------------------------------------------- 1 | const { notEmpty } = require('../utils.js') 2 | 3 | module.exports = { 4 | description: 'generate a view', 5 | prompts: [{ 6 | type: 'input', 7 | name: 'name', 8 | message: 'view name please', 9 | validate: notEmpty('name') 10 | }, 11 | { 12 | type: 'checkbox', 13 | name: 'blocks', 14 | message: 'Blocks:', 15 | choices: [{ 16 | name: '