Browse Source

日志jar包冲突,docker配置优化

regan 3 years ago
parent
commit
a1c69bccc7

+ 3 - 3
docker-compose/docker-compose.yml

@@ -1,4 +1,4 @@
-version: '1.0'
+version: '3'
 services:
   redis:
     image: redis:5.0.8
@@ -33,8 +33,8 @@ services:
     volumes:
       - "iotkit-volume:/usr/share/nginx/html/upload"
   iotkit:
-    image: uncleregan/iotkit:0.3.3
-    container_name: iotkit-cei
+    image: uncleregan/iotkit:0.3.4
+    container_name: iotkit-ce
     restart: on-failure
     ports:
       - 8086:8086 # API端口

+ 6 - 0
iot-standalone/pom.xml

@@ -93,6 +93,12 @@
         <dependency>
             <groupId>it.ozimov</groupId>
             <artifactId>embedded-redis</artifactId>
+            <exclusions>
+                <exclusion>
+                    <artifactId>slf4j-simple</artifactId>
+                    <groupId>org.slf4j</groupId>
+                </exclusion>
+            </exclusions>
         </dependency>
 
         <dependency>

+ 2 - 0
iot-standalone/src/main/java/cc/iotkit/manager/Application.java

@@ -22,6 +22,8 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc;
 public class Application {
 
     public static void main(String[] args) {
+        //System.setProperty("disabledEmbeddedEs","true");
+        //System.setProperty("disabledEmbeddedRedis","true");
         if (EmbeddedElasticSearchConfig.embeddedEnable()) {
             EmbeddedElasticSearchConfig.startEmbeddedElasticSearch();
         }

+ 6 - 6
iot-standalone/src/main/resources/application.yml

@@ -11,14 +11,14 @@ spring:
   elasticsearch:
     rest:
       #使用内置es的配置
-      uris: http://127.0.0.1:9200
+      uris: http://elasticsearch:9200
       username:
       password:
       connection-timeout: 10s
 
   redis:
     #使用内置redis的配置
-    host: 127.0.0.1
+    host: redis
     port: 6379
     database: 0
     password:
@@ -29,10 +29,10 @@ spring:
 
 #图片存储用的是阿里云oss,如果需要上传产品图片才需要配置
 aliyun:
-  bucketId: iotkit-img
-  endpoint: oss-cn-shenzhen.aliyuncs.com
-  accessKeyId: 填写阿里云accessKeyId
-  accessKeySecret: 填写阿里云accessKeySecret
+  bucketId: zkxf-oss
+  endpoint: oss-cn-chengdu.aliyuncs.com
+  accessKeyId: LTAI4G6MDwgMXiVV2HxKEDPK
+  accessKeySecret: PDoggnBcXSxP3Tu5FseJlNBo3BY2Y5
 
 sa-token:
   # token名称 (同时也是cookie名称)