sun-pc-linux 1 tháng trước cách đây
mục cha
commit
2a8095100b

+ 4 - 4
pack-sku3d/config-service.yaml

@@ -7,13 +7,13 @@ configer:
 
   -
     name: user-mongo
-    value: mongodb://root:root@sku3d-mongo:27017/usercenter?authSource=admin
-    devValue: mongodb://root:root@124.71.139.24:37018/usercenter?authSource=admin
+    value: mongodb://root:hangzhou_manage_mat_2025@sku3d-mongo:27017/usercenter?authSource=admin
+    devValue: mongodb://root:hangzhou_manage_mat_2025@localhost:37018/usercenter?authSource=admin
 
   -
     name: website-mongo
-    value: mongodb://root:root@sku3d-mongo:27017/sku3d?authSource=admin
-    devValue: mongodb://root:root@localhost:37018/sku3d?authSource=admin
+    value: mongodb://root:hangzhou_manage_mat_2025@sku3d-mongo:27017/sku3d?authSource=admin
+    devValue: mongodb://root:hangzhou_manage_mat_2025@localhost:37018/sku3d?authSource=admin
   -
     name: redis
     value: sku3d-redis:6379#0#default#packsku3d

+ 20 - 4
pack-sku3d/docker-compose.yaml

@@ -48,23 +48,39 @@ services:
     restart: always
     environment:
       MONGO_INITDB_ROOT_USERNAME: root
-      MONGO_INITDB_ROOT_PASSWORD: root
+      MONGO_INITDB_ROOT_PASSWORD: hangzhou_manage_mat_2025
 
     volumes:
-      - ~/data/packs-sku3d/mongo/db:/data/db
-      - ~/data/packs-sku3d/mongo/log:/var/log/mongodb
+      - ~/data/pack-sku3d/mongo/db:/data/db
+      - ~/data/pack-sku3d/mongo/log:/var/log/mongodb
     ports: 
       - 37018:27017
 
+  # fassi 搜图api
+  sku3d-fassi:
+    image: crpi-tlcs37dul3eo9h1x.cn-hangzhou.personal.cr.aliyuncs.com/lymat/fassi:v1
+    restart: always
+    environment:
+      MONGODB: mongodb://root:hangzhou_manage_mat_2025@sku3d-mongo:27017/
 
   #user服务
   sku3d-usercenter:
-    image: registry.cn-chengdu.aliyuncs.com/infish/pack-comm-usercenter:v1.0.0
+    image: crpi-tlcs37dul3eo9h1x.cn-hangzhou.personal.cr.aliyuncs.com/lymat/usercenter:v1
+    restart: always
+    depends_on:
+      - sku3d-bus
+    environment: 
+      NATS: nats://sku3d-bus:4222
+
+  # website api服务
+  sku3d-website:
+    image: crpi-tlcs37dul3eo9h1x.cn-hangzhou.personal.cr.aliyuncs.com/lymat/website:v1
     restart: always
     depends_on:
       - sku3d-bus
     environment: 
       NATS: nats://sku3d-bus:4222
+      SEARCH_IMAGE_ADDR: http://sku3d-fassi:5000
   
 
 

+ 1 - 19
pack-sku3d/nginx/conf.d/default.conf

@@ -42,14 +42,10 @@ server {
     #}
 
 
-    # 商城接口
-    location /mall/ {
-       proxy_pass  http://sku3d-mall:7904/mall/;
-    }
 
     # 商城接口
     location /website/ {
-       proxy_pass  http://sku3d-website:7902/sku3dsite/;
+       proxy_pass  http://sku3d-website:7902/longyuan/;
     }
 
     # 网站用户接口
@@ -60,18 +56,4 @@ server {
         proxy_set_header X-Real-IP $remote_addr;
         proxy_pass  http://sku3d-usercenter:8908/usercenter/;
     }
-
-    #商城用户接口
-    location /malluser/ {
-       proxy_pass  http://sku3d-malluser:8908/usercenter/;
-    }
-
-    location /eps2svg/ {
-       proxy_pass  http://eps2svg-srv:8000/;
-    }
-
-    #nats-exporter
-    # location /natsexporter/ {
-    #    proxy_pass  http://nats-exporter:7777/;
-    # }
 }

+ 0 - 11
sku3d/sku3d/build.bat

@@ -1,11 +0,0 @@
-set GOARCH=amd64
-set GOOS=linux
-go build
-
-rem docker rmi registry.cn-chengdu.aliyuncs.com/sku3d/main:1.0.10
-rem docker build -t registry.cn-chengdu.aliyuncs.com/sku3d/main:1.0.11 .
-rem docker push registry.cn-chengdu.aliyuncs.com/sku3d/main:1.0.11
-
-docker rmi registry.cn-chengdu.aliyuncs.com/sku3d/maintest:1.0.10
-docker build -t registry.cn-chengdu.aliyuncs.com/sku3d/maintest:1.0.11 .
-docker push registry.cn-chengdu.aliyuncs.com/sku3d/maintest:1.0.11

+ 10 - 18
sku3d/sku3d/build.sh

@@ -1,31 +1,23 @@
 #!/bin/bash
-# rm -rf sku3dweb
-# echo "building..."
-# go build
 
 # 编译应用
 echo "building..."
 
 go build -o sku3dweb-service
 
-# 命名镜像
-local_imge="pack-sku3d-website:v1.0.0"
-repository_image="registry.cn-chengdu.aliyuncs.com/infish/pack-sku3d-website:v1.0.0"
+# 设置变量
+IMAGE_NAME="crpi-tlcs37dul3eo9h1x.cn-hangzhou.personal.cr.aliyuncs.com/lymat/website"
+VERSION="v1"
 
-# 删除本地已存在的镜像
-docker rmi $repository_image
+# 构建 Docker 镜像
+echo "Building Docker image..."
+docker build -t ${IMAGE_NAME}:${VERSION} .
 
-# 创建本地镜像
-docker build -t $local_imge .
+# 推送镜像到仓库
+echo "Pushing Docker image..."
+docker push ${IMAGE_NAME}:${VERSION}
 
-# 镜像标签
-docker tag $local_imge $repository_image
-
-# push到镜像仓库,需要登陆对应docker仓库账号
-docker push $repository_image
+echo "Build and push completed successfully!"
 
 # 删除编译的文件
 rm -rf sku3dweb-service
-
-# 运行示例
-# docker run  -itd -p 20001:20001 --name comm-pay-service pay-service:1.0.0

+ 1 - 1
sku3d/sku3d/db/db.go

@@ -33,7 +33,7 @@ func (db *MongoDB) GetOrCreateDatabase(name string) *mongo.Database {
 var MongoInst *MongoDB
 
 func NewMongoDB(bus *comm.NatsBus) *MongoDB {
-	inst, err := bus.NewMongoDBFromConfigDev("website-mongo")
+	inst, err := bus.NewMongoDBFromConfig("website-mongo")
 	if err != nil {
 		panic(err)
 	}

+ 0 - 8
sku3d/sku3d/readme.rd

@@ -1,8 +0,0 @@
-
-docker run --restart=always --name sku3d -itd -p 7902:7902 -e MONGO="mongodb://admin:123456@124.70.148.113:27018/sku3d_dadong?authSource=admin" -e  NATS="nats://124.71.139.24:4222" registry.cn-chengdu.aliyuncs.com/sku3d/main:1.0.0
-
-
-发布日志:
-2022-5-23 修复GPU渲染环境球Id为零的bug
-
-v2022-8-11