Bladeren bron

修改运行配置

梅杰 6 jaren geleden
bovenliggende
commit
79010c589d
3 gewijzigde bestanden met toevoegingen van 15 en 10 verwijderingen
  1. 2 5
      build-run.sh
  2. 11 3
      src/main/resources/application.yml
  3. 2 2
      src/main/resources/templates/task_list.html

+ 2 - 5
build-run.sh

@@ -1,10 +1,7 @@
 #!/bin/sh
 mvn clean package
 
-docker build -t crowd_review:0.1 .
+docker build -t crowd_review:0.2 .
 
-docker run --name crowd_review --rm -it -v /Users/major/development/crowd_review/deploy.sh:/project/deploy.sh -p 8090:8090 -e MONGODB_ADDR=host.docker.internal:27017 crowd_review:0.2 /bin/sh
+docker run --name crowd_review --rm -it -v /Users/major/development/crowd_review/deploy.sh:/project/deploy.sh -p 8090:8090 -e MONGODB_REVIEW_DB=crowd_review -e MONGODB_REVIEW_HOST=host.docker.internal -e MONGODB_REVIEW_PORT=27017 -e MONGODB_REPORT_DB=co-report -e MONGODB_REPORT_HOST=host.docker.internal -e MONGODB_REPORT_PORT=27017 -e EXPORT_ADDR=http://182.254.197.194:9002/generateReport crowd_review:0.2 /bin/sh
 
-report api addr
-
-bug report source addr

+ 11 - 3
src/main/resources/application.yml

@@ -42,9 +42,17 @@ spring:
     profiles: test
     thymeleaf:
         cache: false
-    data:
-      mongodb:
-        uri: mongodb://${MONGODB_ADDR}/crowd_review
+
+
+mongodb1.database: ${MONGODB_REVIEW_DB}
+mongodb1.host: ${MONGODB_REVIEW_HOST}
+mongodb1.port: ${MONGODB_REVIEW_PORT}
+
+mongodb2.database: ${MONGODB_REPORT_DB}
+mongodb2.host: ${MONGODB_REPORT_HOST}
+mongodb2.port: ${MONGODB_REPORT_PORT}
+
+report.export.addr: ${EXPORT_ADDR}
 server:
     port: 8090
 logging:

+ 2 - 2
src/main/resources/templates/task_list.html

@@ -95,8 +95,8 @@
                         <td><img th:src="${task.icon}" style="width: 25px; height: 25px;" /></td>
                         <td><b><a href="#" id="task-name" th:text="${task.name}">{{ task.name }}</a></b></td>
                         <td th:text="${task.version}"></td>
-                        <td th:if="${task.status == 0}"><span  class="label label-info">审核中</span></td>
-                        <td th:if="${task.status == 1}"><span  class="label label-success">审核结束</span></td>
+                        <td th:if="${task.numOfUndeal > 0}"><span  class="label label-info">审核中</span></td>
+                        <td th:if="${task.numOfUndeal == 0}"><span  class="label label-success">审核结束</span></td>
                         <td th:text="${task.startTime}">{{ task.print_start_time }}</td>
                         <td th:text="${task.endTime}">{{ task.print_end_time }}</td>
                         <td style="width: 200px;">