Skip to content

Commit

Permalink
feat: JMX working on DLD
Browse files Browse the repository at this point in the history
Remember to set JMX_HOSTNAME and JMX_PORT. NOTE: JMX_PORT must be equal
to the one exposed by Docker (e.g. 7099:7099)
  • Loading branch information
lroffia committed Jul 24, 2024
1 parent c123413 commit bdf460d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ RUN mvn clean package

FROM openjdk:11.0-jre

COPY --from=build ./run.sh /run.sh
COPY --from=build ./engine/target/engine-1.0.0-SNAPSHOT.jar /engine.jar
COPY --from=build ./engine/src/main/resources/jmxremote.password /jmxremote.password
COPY --from=build ./engine/src/main/resources/jmxremote.access /jmxremote.access
Expand All @@ -22,11 +23,13 @@ COPY --from=build ./engine/src/main/resources/endpoint.jpar /endpoint.jpar
COPY --from=build ./engine/src/main/resources/endpoints /endpoints

RUN chmod 600 /jmxremote.password
RUN chmod 777 /run.sh

EXPOSE 8000
EXPOSE 9000
EXPOSE 7090

# MUST BE SET WITH THE HOST NAME (e.g. vaimee.com , vaimee.org, ...)
ENV JMX_HOSTNAME=0.0.0.0
ENTRYPOINT java -Djava.rmi.server.hostname=${JMX_HOSTNAME} -Dcom.sun.management.jmxremote.rmi.port=7090 -Dcom.sun.management.jmxremote.port=7090 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote -jar engine.jar
ENV JMX_PORT=7090
ENTRYPOINT java -Djava.rmi.server.hostname=${JMX_HOSTNAME} -Dcom.sun.management.jmxremote.rmi.port=${JMX_PORT} -Dcom.sun.management.jmxremote.port=${JMX_PORT} -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote=true -jar engine.jar

0 comments on commit bdf460d

Please sign in to comment.