mirror of
https://github.com/LamGC/ContentGrabbingJi.git
synced 2025-04-29 22:27:33 +00:00
[Change] Dockerfile.sample 调整构建指令顺序以充分利用构建缓存;
[Fix] Main 修复SystemProperties设置null抛出NPE的问题;
This commit is contained in:
parent
46cb47c7d1
commit
40c5284be2
@ -3,7 +3,8 @@ FROM openjdk:8u252-jre
|
|||||||
ENV jarFileName=ContentGrabbingJi-exec.jar
|
ENV jarFileName=ContentGrabbingJi-exec.jar
|
||||||
ENV CGJ_REDIS_URI="127.0.0.1:6379"
|
ENV CGJ_REDIS_URI="127.0.0.1:6379"
|
||||||
ENV CGJ_PROXY=""
|
ENV CGJ_PROXY=""
|
||||||
COPY ${jarFileName} /CGJ.jar
|
|
||||||
RUN mkdir /data/
|
RUN mkdir /data/
|
||||||
|
|
||||||
|
COPY ${jarFileName} /CGJ.jar
|
||||||
|
|
||||||
CMD ["java", "-Dcgj.logsPath=/data/logs", "-jar", "/CGJ.jar", "botMode", "-botDataDir=/data"]
|
CMD ["java", "-Dcgj.logsPath=/data/logs", "-jar", "/CGJ.jar", "botMode", "-botDataDir=/data"]
|
@ -129,10 +129,10 @@ public class Main {
|
|||||||
if(env != null) {
|
if(env != null) {
|
||||||
System.setProperty("cgj." + sysPropKey, env);
|
System.setProperty("cgj." + sysPropKey, env);
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else if(defaultValue != null) {
|
||||||
System.setProperty("cgj." + sysPropKey, defaultValue);
|
System.setProperty("cgj." + sysPropKey, defaultValue);
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Command
|
@Command
|
||||||
|
Loading…
Reference in New Issue
Block a user