diff --git a/Dockerfile.openj9 b/Dockerfile.openj9 index 2710b4c..3af2f0c 100644 --- a/Dockerfile.openj9 +++ b/Dockerfile.openj9 @@ -15,6 +15,8 @@ COPY --from=build /app/build/libs/piped-1.0-all.jar /app/piped.jar COPY VERSION . +RUN /bin/bash -c 'java -Xshareclasses:allowClasspaths -Xquickstart -jar /app/piped.jar &' ; sleep 30 ; pkill java + EXPOSE 8080 CMD java -server -Xmx1G -XX:+UnlockExperimentalVMOptions -XX:+OptimizeStringConcat -XX:+UseStringDeduplication -XX:+UseCompressedOops -XX:+UseNUMA -XX:+UseParallelGC -XX:-UseBiasedLocking -Xshareclasses:allowClasspaths -Xtune:virtualized -jar /app/piped.jar diff --git a/Dockerfile.openj9.ci b/Dockerfile.openj9.ci index bc26439..2518a08 100644 --- a/Dockerfile.openj9.ci +++ b/Dockerfile.openj9.ci @@ -6,6 +6,8 @@ COPY ./piped.jar /app/piped.jar COPY VERSION . +RUN /bin/bash -c 'java -Xshareclasses:allowClasspaths -Xquickstart -jar /app/piped.jar &' ; sleep 30 ; pkill java + EXPOSE 8080 CMD java -server -Xmx1G -XX:+UnlockExperimentalVMOptions -XX:+OptimizeStringConcat -XX:+UseStringDeduplication -XX:+UseCompressedOops -XX:+UseNUMA -XX:+UseParallelGC -XX:-UseBiasedLocking -Xshareclasses:allowClasspaths -Xtune:virtualized -jar /app/piped.jar diff --git a/src/main/java/me/kavin/piped/consts/Constants.java b/src/main/java/me/kavin/piped/consts/Constants.java index 4475acd..cfc5fc4 100644 --- a/src/main/java/me/kavin/piped/consts/Constants.java +++ b/src/main/java/me/kavin/piped/consts/Constants.java @@ -90,7 +90,10 @@ public class Constants { Properties prop = new Properties(); try { YOUTUBE_SERVICE = NewPipe.getService(0); - prop.load(new FileReader("config.properties")); + + if (new File("config.properties").exists()) { + prop.load(new FileReader("config.properties")); + } PORT = Integer.parseInt(getProperty(prop, "PORT", "8080")); HTTP_WORKERS = getProperty(prop, "HTTP_WORKERS",