Browse Source

merge docker networks config

animeic 2 years ago
parent
commit
beabb7e190
2 changed files with 22 additions and 13 deletions
  1. 10 10
      config-service.yaml
  2. 12 3
      docker-compose.yaml

+ 10 - 10
config-service.yaml

@@ -7,19 +7,19 @@ configer:
   -
     name: box-mongo
     value: mongodb://root:boxcost@box-mongo:27017/box-cost?authSource=admin
-    devValue: mongodb://root:boxcost@127.0.0.1:37030/box-cost?authSource=admin
-    # devValue: mongodb://root:boxcost@124.71.139.24:37030/box-cost?authSource=admin
+    #devValue: mongodb://root:boxcost@127.0.0.1:37030/box-cost?authSource=admin
+    devValue: mongodb://root:boxcost@124.71.139.24:37030/box-cost?authSource=admin
   -
-    name: box-user-mongo
+    name: user-mongo
     value: mongodb://root:boxcost@box-mongo:27017/box-user?authSource=admin
-    devValue: mongodb://root:boxcost@127.0.0.1:37030/box-user?authSource=admin
-    # devValue: mongodb://root:boxcost@124.71.139.24:37030/box-cost?authSource=admin
-
+    #devValue: mongodb://root:boxcost@127.0.0.1:37030/box-user?authSource=admin
+    devValue: mongodb://root:boxcost@124.71.139.24:37030/box-user?authSource=admin
+    
   -
-    name: box-redis
-    value: box-redis:6379#0#default#packbox
-    devValue: 127.0.0.1:16390#0#default#packbox
-    # devValue: 124.71.139.24:16390#0#default#packbox
+    name: redis
+    value: redis:6379#0#default#boxcomm
+    #devValue: 127.0.0.1:16390#0#default#boxcomm
+    devValue: 124.71.139.24:16390#0#default#packbox
 
 # adapter:
 #   -

+ 12 - 3
docker-compose.yaml

@@ -3,7 +3,7 @@ version: '3.8'
 # 网络
 networks:
   default:
-    name: default-network
+    name: box-network
     external: true
 
 services:
@@ -13,16 +13,25 @@ services:
     restart: always
     ports:
       - 18088:80
+
     volumes:
       - ./nginx/conf.d:/etc/nginx/conf.d
       - ./nginx/www:/usr/share/nginx/html
 
+    # links:
+    #   - box-cost
+    #   - box-usercenter
+
+    depends_on:
+      - box-cost
+      - box-usercenter
+
   #bus消息中间件
   box-bus:
     restart: always
     image: registry.cn-chengdu.aliyuncs.com/infish/pack-comm-bus:v1.0.0
     volumes:
-      - ./config-service.yaml:/root/box-bus/app.yaml
+      - ./config-service.yaml:/root/bus/app.yaml
 
     depends_on:
       - box-mongo
@@ -64,7 +73,7 @@ services:
 
   # 用户中心 8908
   box-usercenter:
-    image: registry.cn-chengdu.aliyuncs.com/infish/pack-box-usercenter:v1.0.0
+    image: registry.cn-chengdu.aliyuncs.com/infish/pack-comm-usercenter:v1.0.0
     restart: always
     depends_on:
       - box-bus