5 Achegas e635d57a8e ... e34592b9b0

Autor SHA1 Mensaxe Data
  yzx e34592b9b0 Merge branch 'master' of http://1.14.104.71:10880/root/ylrz_his_scrm_companyUI hai 1 mes
  yzx f9188594ce docker hai 1 mes
  yzx 34022232bd Merge branch 'master' of http://1.14.104.71:10880/root/ylrz_his_scrm_companyUI hai 1 mes
  yzx 7725aca946 Merge branch 'master' of http://1.14.104.71:10880/root/ylrz_his_scrm_companyUI hai 2 meses
  yzx 8146a5bb16 config hai 2 meses
Modificáronse 4 ficheiros con 58 adicións e 4 borrados
  1. 2 2
      .env.development
  2. 2 2
      .env.prod-test
  3. 16 0
      Dockerfile
  4. 38 0
      nginx.conf

+ 2 - 2
.env.development

@@ -1,7 +1,7 @@
 # 页面标题
-VUE_APP_TITLE =木易华康SCRM销售端
+VUE_APP_TITLE =测试平台SCRM销售端
 # 公司名称
-VUE_APP_COMPANY_NAME =福州市木易华康医药有限公司
+VUE_APP_COMPANY_NAME =测试有限公司
 # ICP备案号
 VUE_APP_ICP_RECORD =闽ICP备2020016609号-3
 # ICP网站访问地址

+ 2 - 2
.env.prod-test

@@ -1,7 +1,7 @@
 # 页面标题
 VUE_APP_TITLE =互联网医院管理系统
-# 公司名称
-VUE_APP_COMPANY_NAME =银川鑫泰互联网医院有限公司
+# 公司名称 
+VUE_APP_COMPANY_NAME 互联网医院有限公司
 # ICP备案号
 VUE_APP_ICP_RECORD =宁ICP备2022001349号
 # ICP网站访问地址

+ 16 - 0
Dockerfile

@@ -0,0 +1,16 @@
+
+
+#基于官方 NGINX 镜像部署(精简镜像)
+FROM nginx:alpine
+
+# 复制本地打包好的 dist 目录到 NGINX 静态资源目录
+COPY ./dist /usr/share/nginx/html
+
+# 替换 NGINX 默认配置(用我们自定义的 nginx.conf)
+COPY ./nginx.conf /etc/nginx/nginx.conf
+
+# 暴露容器端口(与 nginx.conf 中 listen 一致)
+#EXPOSE 80
+
+# 启动 NGINX(前台运行,避免容器启动后退出)
+CMD ["nginx", "-g", "daemon off;"]

+ 38 - 0
nginx.conf

@@ -0,0 +1,38 @@
+# nginx.conf
+worker_processes  5;
+
+events {
+    worker_connections  1024;
+}
+
+http {
+    include       mime.types;
+    default_type  application/octet-stream;
+    client_max_body_size 200m;
+    sendfile        on;
+    keepalive_timeout  65;
+
+    server {
+        listen       80;  # 容器内端口
+        server_name  localhost;
+
+        # 前端静态资源目录(对应容器内的 /usr/share/nginx/html)
+        root   /usr/share/nginx/html;
+        index  index.html;
+
+        # 关键:处理 VUE Router history 模式(避免刷新 404)
+        location / {
+            try_files $uri $uri/ /index.html;  # 所有路由指向 index.html
+        }
+
+        # 关键:反向代理 API(解决跨域,替换为你的真实后端地址)
+        location /prod-api/ {
+            proxy_pass http://192.168.52.215:7773/;  # 后端 API 地址(末尾加 / 避免路径拼接问题)
+            proxy_set_header Host $host;
+            proxy_set_header X-Real-IP $remote_addr;
+            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+            proxy_set_header X-Forwarded-Proto $scheme;  # 传递 HTTPS 协议
+        }
+
+     }
+}