Browse Source

config user module

animeic 2 years ago
parent
commit
bcd8036d12
4 changed files with 39 additions and 3 deletions
  1. 2 2
      config-service.yaml
  2. 9 1
      docker-compose.yaml
  3. 15 0
      mongo-migrations/1_apps.down.json
  4. 13 0
      mongo-migrations/1_apps.up.json

+ 2 - 2
config-service.yaml

@@ -10,13 +10,13 @@ configer:
     #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: user-mongo
+    name: box-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-user?authSource=admin
     
   -
-    name: redis
+    name: box-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

+ 9 - 1
docker-compose.yaml

@@ -73,12 +73,20 @@ services:
 
   # 用户中心 8908
   box-usercenter:
-    image: registry.cn-chengdu.aliyuncs.com/infish/pack-comm-usercenter:v1.0.0
+    image: registry.cn-chengdu.aliyuncs.com/infish/pack-comm-usercenter:v1.0.1
     restart: always
     depends_on:
       - box-bus
     environment: 
       NATS: nats://box-bus:4222
+      CONFIGER_MONGO: box-user-mongo
+      CONFIGER_REDIS: box-redis
+      CONFIGER_JWT: spu3d#spu3d secret#168
+      IGNORE_USERTYPE: "true"
+      # MONGO_MIGRATIONS: /data/migrations==mongodb://root:3dshow@3dshow-mongo-alpha:27017/supply-user?authSource=admin&&/data/migrations==mongodb://user:password@host:port/dbname?query
+      MONGO_MIGRATIONS: /data/migrations==mongodb://root:boxcost@box-mongo:27017/box-user?authSource=admin  
+    volumes:
+      - ./mongo-migrations:/data/migrations
 
   # excel 转pdf
   office-pdf:

+ 15 - 0
mongo-migrations/1_apps.down.json

@@ -0,0 +1,15 @@
+[
+    {
+        "delete": "apps",
+        "deletes": [
+           {
+             "q" : {
+                "_id": {
+                    "$oid": "637dde15ad5446a2050456f1"
+                }
+             },
+             "limit" : 1
+           }
+        ]
+     }
+]

+ 13 - 0
mongo-migrations/1_apps.up.json

@@ -0,0 +1,13 @@
+[
+    {
+        "insert": "apps",
+        "documents": [ {
+            "_id": {
+                "$oid": "637dde15ad5446a2050456f1"
+            },
+            "name": "boxcost",
+            "key": "boxcost",
+            "restrict": false
+        }]
+     }
+]