mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-08-14 23:51:41 +00:00
Merge pull request #670 from TeamPiped/hotspot-entrypoint
Add common hotspot entrypoint
This commit is contained in:
commit
ff38f16221
5 changed files with 17 additions and 4 deletions
|
@ -11,10 +11,12 @@ FROM eclipse-temurin:17-jre
|
||||||
|
|
||||||
WORKDIR /app/
|
WORKDIR /app/
|
||||||
|
|
||||||
|
COPY hotspot-entrypoint.sh /
|
||||||
|
|
||||||
COPY --from=build /app/build/libs/piped-1.0-all.jar /app/piped.jar
|
COPY --from=build /app/build/libs/piped-1.0-all.jar /app/piped.jar
|
||||||
|
|
||||||
COPY VERSION .
|
COPY VERSION .
|
||||||
|
|
||||||
EXPOSE 8080
|
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"]
|
||||||
|
|
|
@ -11,10 +11,12 @@ FROM azul/zulu-openjdk:17-jre-headless-latest
|
||||||
|
|
||||||
WORKDIR /app/
|
WORKDIR /app/
|
||||||
|
|
||||||
|
COPY hotspot-entrypoint.sh /
|
||||||
|
|
||||||
COPY --from=build /app/build/libs/piped-1.0-all.jar /app/piped.jar
|
COPY --from=build /app/build/libs/piped-1.0-all.jar /app/piped.jar
|
||||||
|
|
||||||
COPY VERSION .
|
COPY VERSION .
|
||||||
|
|
||||||
EXPOSE 8080
|
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"]
|
||||||
|
|
|
@ -2,10 +2,12 @@ FROM azul/zulu-openjdk:17-jre-headless-latest
|
||||||
|
|
||||||
WORKDIR /app/
|
WORKDIR /app/
|
||||||
|
|
||||||
|
COPY hotspot-entrypoint.sh /
|
||||||
|
|
||||||
COPY ./piped.jar /app/piped.jar
|
COPY ./piped.jar /app/piped.jar
|
||||||
|
|
||||||
COPY VERSION .
|
COPY VERSION .
|
||||||
|
|
||||||
EXPOSE 8080
|
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"]
|
||||||
|
|
|
@ -2,10 +2,12 @@ FROM eclipse-temurin:17-jre
|
||||||
|
|
||||||
WORKDIR /app/
|
WORKDIR /app/
|
||||||
|
|
||||||
|
COPY hotspot-entrypoint.sh /
|
||||||
|
|
||||||
COPY ./piped.jar /app/piped.jar
|
COPY ./piped.jar /app/piped.jar
|
||||||
|
|
||||||
COPY VERSION .
|
COPY VERSION .
|
||||||
|
|
||||||
EXPOSE 8080
|
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
hotspot-entrypoint.sh
Executable file
5
hotspot-entrypoint.sh
Executable file
|
@ -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
|
Loading…
Reference in a new issue