ソースを参照

添加alpha测试环境

491520313@qq.com 3 週間 前
コミット
23118d36f9

+ 25 - 0
pack-sku3d-alpha/config-service.yaml

@@ -0,0 +1,25 @@
+log:
+  fileName: pack-sku3d.log
+  level: 1
+  serviceName: pack-sku3d-alpha
+
+configer:
+  - name: user-mongo
+    value: mongodb://root:hangzhou_manage_mat_2025@sku3d-mongo-alpha:27017/usercenter?authSource=admin
+    devValue: mongodb://root:hangzhou_manage_mat_2025@47.96.90.34:37019/usercenter?authSource=admin
+
+  - name: website-mongo
+    value: mongodb://root:hangzhou_manage_mat_2025@sku3d-mongo-alpha:27017/sku3d?authSource=admin
+    devValue: mongodb://root:hangzhou_manage_mat_2025@47.96.90.34:37019/sku3d?authSource=admin
+  - name: redis
+    value: sku3d-redis-alpha:6379#0#default#packsku3d
+    devValue: 47.96.90.34:16379#0#default#packsku3d
+
+startLocalNats: true
+startNatsShellParams: "-p 4222 -m 8222 -js -c server.conf"
+startNatsPort: 4222
+
+nats:
+  url: nats://sku3d-nats-alpha:4222
+  maxReconnect: 100000
+  reconnDelaySecond: 5

+ 87 - 0
pack-sku3d-alpha/docker-compose.yaml

@@ -0,0 +1,87 @@
+networks:
+  default:
+    name: default-network
+    external: true
+# 服务
+services:
+  #nginx反向代理
+  sku3d-nginx-alpha:
+    image: "registry.cn-chengdu.aliyuncs.com/infish/pack-comm-nginx:1.23.1"
+    restart: always
+    ports:
+      - 18082:80
+    volumes:
+      - ./nginx/conf.d:/etc/nginx/conf.d
+      - ./nginx/www:/usr/share/nginx/html
+
+    depends_on:
+      - sku3d-usercenter-alpha
+
+  # nats消息中间件
+  sku3d-bus-alpha:
+    restart: always
+    image: registry.cn-chengdu.aliyuncs.com/infish/pack-comm-bus:v1.0.1
+    volumes:
+      - ./config-service.yaml:/root/bus/app.yaml
+
+    depends_on:
+      - sku3d-mongo-alpha
+      - sku3d-redis-alpha
+    ports:
+      - 14225:4222
+
+  # redis缓存
+  sku3d-redis-alpha:
+    image: "redis:alpine"
+    restart: always
+    command:
+      --requirepass "packsku3d" #这一行是设置密码
+    privileged: true
+    ports:
+      - 16380:6379
+
+  # mongo数据库
+  sku3d-mongo-alpha:
+    image: crpi-tlcs37dul3eo9h1x.cn-hangzhou.personal.cr.aliyuncs.com/lymat/mongo:4.4.1
+    restart: always
+    environment:
+      MONGO_INITDB_ROOT_USERNAME: root
+      MONGO_INITDB_ROOT_PASSWORD: hangzhou_manage_mat_2025
+
+    volumes:
+      - ./data/mongo/db:/data/db
+      - ./data/mongo/log:/var/log/mongodb
+    ports: 
+      - 37019:27017
+
+  # fassi 搜图api
+  sku3d-fassi-aplha:
+    image: crpi-tlcs37dul3eo9h1x.cn-hangzhou.personal.cr.aliyuncs.com/lymat/fassi:v1
+    restart: always
+    environment:
+      MONGODB: mongodb://root:hangzhou_manage_mat_2025@sku3d-mongo-alpha:27017/
+      # ALIYUN_FUNCTION_URL: https://imagefeature-hauveswkcf.cn-hangzhou.fcapp.run
+      # ALIYUN_FUNCTION_URL: http://172.31.69.25:5001
+      ALIYUN_FUNCTION_URL: https://featurev-cpccdfqdhb.cn-hangzhou-vpc.fcapp.run
+
+  #user服务
+  sku3d-usercenter-alpha:
+    image: crpi-tlcs37dul3eo9h1x.cn-hangzhou.personal.cr.aliyuncs.com/lymat/usercenter:v1
+    restart: always
+    depends_on:
+      - sku3d-bus-alpha
+    environment: 
+      NATS: nats://sku3d-bus-alpha:4222
+
+  # website api服务
+  sku3d-website-alpha:
+    image: registry.cn-chengdu.aliyuncs.com/infish/lymatweb:v1.1
+    restart: always
+    depends_on:
+      - sku3d-bus-alpha
+    environment: 
+      NATS: nats://sku3d-bus-alpha:4222
+      SEARCH_IMAGE_ADDR: http://sku3d-fassi-alpha:5000
+  
+
+

+ 59 - 0
pack-sku3d-alpha/nginx/conf.d/default.conf

@@ -0,0 +1,59 @@
+server {
+    listen       80;
+    listen  [::]:80;
+    server_name  localhost;
+    #access_log  /var/log/nginx/host.access.log  main;
+    client_max_body_size 200M;
+    client_body_buffer_size 30M;
+    location / {
+        root   /usr/share/nginx/html;
+        index  index.html index.htm;
+    }
+    #error_page  404              /404.html;
+
+    # redirect server error pages to the static page /50x.html
+    #
+    error_page   500 502 503 504  /50x.html;
+    location = /50x.html {
+        root   /usr/share/nginx/html;
+    }
+
+    # proxy the PHP scripts to Apache listening on 127.0.0.1:80
+    #
+    #location ~ \.php$ {
+    #    proxy_pass   http://127.0.0.1;
+    #}
+
+    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
+    #
+    #location ~ \.php$ {
+    #    root           html;
+    #    fastcgi_pass   127.0.0.1:9000;
+    #    fastcgi_index  index.php;
+    #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
+    #    include        fastcgi_params;
+    #}
+
+    # deny access to .htaccess files, if Apache's document root
+    # concurs with nginx's one
+    #
+    #location ~ /\.ht {
+    #    deny  all;
+    #}
+
+
+
+    # 商城接口
+    location /website/ {
+       proxy_pass  http://sku3d-website-alpha:7902/longyuan/;
+    }
+    
+    # 网站用户接口
+    location /usercenter/ {
+        proxy_set_header Host $host;
+        proxy_set_header X-Forwarded-For $remote_addr;
+        proxy_set_header X-Forwarded-Host $server_name;
+        proxy_set_header X-Real-IP $remote_addr;
+        proxy_pass  http://sku3d-usercenter-alpha:8908/usercenter/;
+    }
+}

+ 1 - 0
pack-sku3d-alpha/nginx/www/index.html

@@ -0,0 +1 @@
+hello world~!!!

+ 3 - 0
pack-sku3d-alpha/readme.md

@@ -0,0 +1,3 @@
+注意更改docker-compose.yaml中的云函数地址`ALIYUN_FUNCTION_URL`
+
+alpha测试环境