Skip to content

Commit

Permalink
Merge pull request #670 from TeamPiped/hotspot-entrypoint
Browse files Browse the repository at this point in the history
Add common hotspot entrypoint
  • Loading branch information
FireMasterK authored Aug 4, 2023
2 parents 0d9d1be + 1d9dbe3 commit ff38f16
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ FROM eclipse-temurin:17-jre

WORKDIR /app/

COPY hotspot-entrypoint.sh /

COPY --from=build /app/build/libs/piped-1.0-all.jar /app/piped.jar

COPY VERSION .

EXPOSE 8080

CMD java -server -Xmx1G -XX:+UnlockExperimentalVMOptions -XX:+HeapDumpOnOutOfMemoryError -XX:+OptimizeStringConcat -XX:+UseStringDeduplication -XX:+UseCompressedOops -XX:+UseNUMA -XX:+UseG1GC -Xshare:on -jar /app/piped.jar
ENTRYPOINT ["/hotspot-entrypoint.sh"]
4 changes: 3 additions & 1 deletion Dockerfile.azul
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ FROM azul/zulu-openjdk:17-jre-headless-latest

WORKDIR /app/

COPY hotspot-entrypoint.sh /

COPY --from=build /app/build/libs/piped-1.0-all.jar /app/piped.jar

COPY VERSION .

EXPOSE 8080

CMD java -server -Xmx1G -XX:+UnlockExperimentalVMOptions -XX:+HeapDumpOnOutOfMemoryError -XX:+OptimizeStringConcat -XX:+UseStringDeduplication -XX:+UseCompressedOops -XX:+UseNUMA -XX:+UseG1GC -jar /app/piped.jar
ENTRYPOINT ["/hotspot-entrypoint.sh"]
4 changes: 3 additions & 1 deletion Dockerfile.azul.ci
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ FROM azul/zulu-openjdk:17-jre-headless-latest

WORKDIR /app/

COPY hotspot-entrypoint.sh /

COPY ./piped.jar /app/piped.jar

COPY VERSION .

EXPOSE 8080

CMD java -server -Xmx1G -XX:+UnlockExperimentalVMOptions -XX:+HeapDumpOnOutOfMemoryError -XX:+OptimizeStringConcat -XX:+UseStringDeduplication -XX:+UseCompressedOops -XX:+UseNUMA -XX:+UseG1GC -jar /app/piped.jar
ENTRYPOINT ["/hotspot-entrypoint.sh"]
4 changes: 3 additions & 1 deletion Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ FROM eclipse-temurin:17-jre

WORKDIR /app/

COPY hotspot-entrypoint.sh /

COPY ./piped.jar /app/piped.jar

COPY VERSION .

EXPOSE 8080

CMD java -server -Xmx1G -XX:+UnlockExperimentalVMOptions -XX:+HeapDumpOnOutOfMemoryError -XX:+OptimizeStringConcat -XX:+UseStringDeduplication -XX:+UseCompressedOops -XX:+UseNUMA -XX:+UseG1GC -Xshare:on -jar /app/piped.jar
ENTRYPOINT ["/hotspot-entrypoint.sh"]
5 changes: 5 additions & 0 deletions hotspot-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env sh

MAX_MEMORY=${MAX_MEMORY:-1G}

java -server -Xmx"$MAX_MEMORY" -XX:+UnlockExperimentalVMOptions -XX:+HeapDumpOnOutOfMemoryError -XX:+OptimizeStringConcat -XX:+UseStringDeduplication -XX:+UseCompressedOops -XX:+UseNUMA -XX:+UseG1GC -jar /app/piped.jar

0 comments on commit ff38f16

Please sign in to comment.