Bläddra i källkod

Merge branch 'master' of http://39.106.8.246:3003/doc/persagy-web-doc

haojianlong 4 år sedan
förälder
incheckning
c4057b06f7
3 ändrade filer med 127 tillägg och 9 borttagningar
  1. 6 7
      docs/.vuepress/config.js
  2. 108 0
      docs/setup/application/tuopu.md
  3. 13 2
      docs/setup/index.js

+ 6 - 7
docs/.vuepress/config.js

@@ -58,13 +58,12 @@ module.exports = {
                     {
                         text: "服务器",
                         items: [{
-                                text: "Nginx",
-                                link: "/setup/server/nginx"
-                            },
-                            {
-                                text: "Tomcat",
-                                link: "/setup/server/tomcat"
-                            }
+                               text: "基础配置",
+                                    link: "/setup/server/nginx"
+                               },{
+                                text: "应用配置",
+                                link: "/setup/application/tuopu"
+                             }
                         ]
                     },
                 ]

+ 108 - 0
docs/setup/application/tuopu.md

@@ -0,0 +1,108 @@
+# 拓扑图配置
+::: details 目录
+[[toc]]
+:::
+## 拓扑图演示地址
+链接:[http://39.102.40.239/persagyTopo/editer](http://39.102.40.239/persagyTopo/editer)
+## 项目依赖
+| Server       | 对应地址                                                                       | 文档                                                                                                   |
+|--------------|--------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------|
+| 拓扑图服务器 | [http://adm.sagacloud.cn/image-service](http://adm.sagacloud.cn/image-service) | [http://39.102.40.239:8080/labsl/swagger-ui.html#/](http://39.102.40.239:8080/labsl/swagger-ui.html#/) |
+| 图片服务器   | [http://localhost:8080/labsl](http://localhost:8080/labsl)                     | -                                                                                                      |
+| 美库服务器   | [http://39.102.40.239:8080/meiku](http://39.102.40.239:8080/meiku)             | [http://39.102.40.239:8080/meiku/swagger-ui.html#/](http://39.102.40.239:8080/meiku/swagger-ui.html#/) |
+| Nginx        | -                                                                              | -                                                                                                      |
+
+## 项目Vue.config 配置
+::: details Vue.config 配置
+```js
+module.exports = {
+    devServer: {
+        // 关闭esline
+        overlay: {
+            warnings: false,
+            errors: false,
+        },
+        proxy: {
+            '/labsl': {
+                target: 'http://39.102.40.239:8080',
+                changeOrigin: true,
+                secure: false,
+            },
+            // 图片服务器
+            '/image-service': {
+                target: 'http://adm.sagacloud.cn',
+                changeOrigin: true,
+                secure: false,
+            },
+        },
+    },
+    lintOnSave: false,
+    publicPath: '/persagyTopo',
+    // 打包名称
+    outputDir: 'persagyTopo',
+    // 放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录
+    assetsDir: 'static',
+}
+```
+:::
+
+## 打包文件
+``` js
+npm run build //定制化脚手架可根据package.json对应命令输入
+```
+注:打包生成对应文件夹(此处打包文件夹名称为:persagyTopo)
+## 发布
+放入服务器 opt/apps/web 文件夹下(也可根据自身业务放入不同文件夹下)
+## nginx
+### nginx配置
+::: details  nginx配置
+```js{8,9,10,11,12}
+ server {
+        listen       80;
+        # server_name  glsms;
+        charset utf-8;
+        # 前端服务目录
+        root   /opt/apps/web;
+        # 各个前端项目地址
+       # 博锐尚格编辑器
+         location /persagyTopo {
+            try_files $uri $uri/ /persagyTopo/index.html;
+        }
+
+     # 博锐拓扑器后台服务
+       location ^~ /labsl {
+            #rewrite  ^/labsl/(.*)$ /$1 break;
+            proxy_pass http://localhost:8080/labsl;
+        }
+      # 图片服务器
+       location ^~ /image-service {
+            #rewrite  ^/image-service/(.*)$ /$1 break;
+            proxy_pass http://adm.sagacloud.cn/image-service;
+        }
+        # gzip 开启缓存
+        location ~* ^.+\.(ico|gif|jpg|jpeg|png)$ {
+            access_log   off;
+            expires      30d;
+        }
+
+        location ~* ^.+\.(css|js|txt|xml|swf|wav)$ {
+            access_log   off;
+            expires      24h;
+        }
+
+        location ~* ^.+\.(html|htm)$ {
+            expires      1h;
+        }
+
+    }
+```
+:::
+### nginx 启动命令
+```js
+// 启动地址
+'/usr/sbin'
+// 启动命令
+nginx -s reload
+// 关闭命令
+nginx  -s stop
+```

+ 13 - 2
docs/setup/index.js

@@ -11,8 +11,19 @@ const content = [
     {
         title: "服务器配置",
         children: [
-            ["/setup/server/nginx", "Nginx"],
-            ["/setup/server/tomcat", "Tomcat"]
+            {
+                title: "基础配置",
+                children: [
+                    ["/setup/server/nginx", "Nginx"],
+                    ["/setup/server/tomcat", "Tomcat"]
+                ]
+            },
+            {
+                title: "应用配置",
+                children: [
+                    ["/setup/application/tuopu", "拓扑图配置"],
+                ]
+            },
         ]
     },
 ];