Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: expose JAVA_OPTIONS in deployments #678

Merged
merged 1 commit into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .rhcicd/clowdapp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ objects:
value: ${ENV_BASE_URL}
- name: EXTERNAL_LOGGING_LEVEL
value: ${EXTERNAL_LOGGING_LEVEL}
- name: JAVA_OPTIONS
value: ${JAVA_OPTIONS}
- name: GC_CONTAINER_OPTIONS
value: "-XX:+UseG1GC"
- name: QUARKUS_HTTP_PORT
Expand All @@ -95,6 +97,9 @@ parameters:
- name: CLOUDWATCH_ENABLED
description: Enable Cloudwatch (or not)
value: "false"
- name: JAVA_OPTIONS
description: Additional options to JDK runtime
value: "-XX:+ExitOnOutOfMemoryError -Xms640m -Xmx1024m"
- name: CPU_LIMIT
description: CPU limit
value: 250m
Expand Down
4 changes: 2 additions & 2 deletions src/main/docker/Dockerfile-build.jvm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ RUN microdnf install -y openssl curl ca-certificates ${JAVA_PACKAGE} \
&& chown 1001:root /deployments \
&& echo "securerandom.source=file:/dev/urandom" >> /etc/alternatives/jre/lib/security/java.security

ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager -XX:+ExitOnOutOfMemoryError -Xms640m -Xmx1024m"
ENV JAVA_OPTIONS="-XX:+ExitOnOutOfMemoryError -Xms640m -Xmx1024m"

# Use four distinct layers so if there are application changes the library layers can be re-used
COPY --from=build --chown=1001 /home/jboss/target/quarkus-app/lib/ /deployments/lib/
Expand All @@ -37,4 +37,4 @@ COPY --from=build --chown=1001 /home/jboss/target/quarkus-app/quarkus/ /deployme
EXPOSE 8080
USER 1001

ENTRYPOINT ["sh", "-c", "java $JAVA_OPTIONS -jar /deployments/quarkus-run.jar"]
ENTRYPOINT ["sh", "-c", "java -Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager $JAVA_OPTIONS -jar /deployments/quarkus-run.jar"]
Loading