zhou-hao 4 years ago
parent
commit
be42707d5c

+ 3 - 1
docker/run-all/docker-compose.yml

@@ -67,6 +67,7 @@ services:
       - 8000-8010:8000-8010 # 预留
     volumes:
       - "jetlinks-volume:/application/static/upload"  # 持久化上传的文件
+      - "jetlinks-protocol-volume:/application/data/protocols"
     environment:
      # - "JAVA_OPTS=-Xms4g -Xmx18g -XX:+UseG1GC"
       - "TZ=Asia/Shanghai"
@@ -96,4 +97,5 @@ volumes:
   postgres-volume:
   redis-volume:
   elasticsearch-volume:
-  jetlinks-volume:
+  jetlinks-volume:
+  jetlinks-protocol-volume:

+ 2 - 2
jetlinks-standalone/src/main/java/org/jetlinks/community/standalone/configuration/protocol/AutoDownloadJarProtocolSupportLoader.java

@@ -41,8 +41,8 @@ public class AutoDownloadJarProtocolSupportLoader extends JarProtocolSupportLoad
 
     public AutoDownloadJarProtocolSupportLoader(WebClient.Builder builder) {
         this.webClient = builder.build();
-        tempPath = new File("./data/protocols");
-        tempPath.mkdir();
+        tempPath = new File(System.getProperty("jetlinks.protocol.temp.path","./data/protocols"));
+        tempPath.mkdirs();
     }
 
     @Override