diff --git a/Dockerfile.sample b/Dockerfile.sample index aa2fb14..3f8636d 100644 --- a/Dockerfile.sample +++ b/Dockerfile.sample @@ -1,8 +1,7 @@ FROM openjdk:8u252-jre ENV jarFileName=ContentGrabbingJi-exec.jar -COPY ${jarFileName} /program/CGJ.jar -RUN mkdir /program/data +COPY ${jarFileName} /CGJ.jar +RUN mkdir /data/ -WORKDIR /program/data -CMD java -jar /program/CGJ.jar botMode \ No newline at end of file +CMD java -Dcgj.logsPath=/data/logs -jar /CGJ.jar botMode -botDataDir=/data \ No newline at end of file diff --git a/src/main/java/net/lamgc/cgj/Main.java b/src/main/java/net/lamgc/cgj/Main.java index 820be95..f6f3493 100644 --- a/src/main/java/net/lamgc/cgj/Main.java +++ b/src/main/java/net/lamgc/cgj/Main.java @@ -52,6 +52,7 @@ public class Main { public static void main(String[] args) throws IOException, ClassNotFoundException { log.trace("ContentGrabbingJi 正在启动..."); + log.debug("Args: {}, LogsPath: {}", Arrays.toString(args), System.getProperty("cgj.logsPath")); log.debug("运行目录: {}", System.getProperty("user.dir")); ArgumentsProperties argsProp = new ArgumentsProperties(args); if(argsProp.containsKey("proxy")) { @@ -85,7 +86,7 @@ public class Main { File cookieStoreFile = new File(System.getProperty("cgj.botDataDir"), "cookies.store"); if(!cookieStoreFile.exists()) { - log.error("未找到cookies.store文件, 是否启动PixivLoginProxyServer? (yes/no)"); + log.warn("未找到cookies.store文件, 是否启动PixivLoginProxyServer? (yes/no)"); Scanner scanner = new Scanner(System.in); if(scanner.nextLine().equalsIgnoreCase("yes")) { startPixivLoginProxyServer();