added hotswap plugin disable parameterization
This commit is contained in:
@@ -9,6 +9,7 @@ ENV JRE_HOME=/usr/local/lib/jvm/java-openjdk-dcevm
|
|||||||
ENV JAVA_OPTS=
|
ENV JAVA_OPTS=
|
||||||
ENV ENABLE_HOTSWAP=true
|
ENV ENABLE_HOTSWAP=true
|
||||||
ENV ENABLE_JDWP=true
|
ENV ENABLE_JDWP=true
|
||||||
|
ENV DISABLE_HOTSWAP_PLUGINS=
|
||||||
|
|
||||||
# Install curl
|
# Install curl
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
|
15
README.md
15
README.md
@@ -28,10 +28,11 @@ You may include your own `hotswap-agent.properties` in any of the `classes` fold
|
|||||||
|
|
||||||
You can specify the following environment variables when running the container.
|
You can specify the following environment variables when running the container.
|
||||||
|
|
||||||
| Environment Variable | Default Value | Description |
|
| Environment Variable | Default Value | Description |
|
||||||
| -------------------- | ------------- | ----------- |
|
| ------------------------- | ------------- | ----------- |
|
||||||
| `JAVA_MEMORY_INIT` | `128m` | The initial and minimum JVM memory. |
|
| `JAVA_MEMORY_INIT` | `128m` | The initial and minimum JVM memory. |
|
||||||
| `JAVA_MEMORY_MAX` | `512m` | The maximum JVM memory allowed. |
|
| `JAVA_MEMORY_MAX` | `512m` | The maximum JVM memory allowed. |
|
||||||
| `ENABLE_HOTSWAP` | `true` | Set to `false` to disable the HotSwap agent. |
|
| `ENABLE_HOTSWAP` | `true` | Set to `false` to disable the HotSwap agent. |
|
||||||
| `ENABLE_JDWP` | `true` | Set to `false` to disable the Java debugger. |
|
| `DISABLE_HOTSWAP_PLUGINS` | | Provide a comma-delimited list of HotSwap plugins to disable. You can find a list of those plugins here: https://github.com/HotswapProjects/HotswapAgent/tree/master/plugin. The name is only specified in the source, like [*Spring*](https://github.com/HotswapProjects/HotswapAgent/blob/master/plugin/hotswap-agent-spring-plugin/src/main/java/org/hotswap/agent/plugin/spring/SpringPlugin.java). |
|
||||||
| `JAVA_OPTS` | | Set to extend the standard `JAVA_OPTS` environment variable. |
|
| `ENABLE_JDWP` | `true` | Set to `false` to disable the Java debugger. |
|
||||||
|
| `JAVA_OPTS` | | Set to extend the standard `JAVA_OPTS` environment variable. |
|
||||||
|
@@ -45,7 +45,7 @@ webappDir=
|
|||||||
|
|
||||||
# Comma separated list of disabled plugins
|
# Comma separated list of disabled plugins
|
||||||
# Use plugin name - e.g. Hibernate, Spring, ZK, Hotswapper, AnonymousClassPatch, Tomcat, Logback ....
|
# Use plugin name - e.g. Hibernate, Spring, ZK, Hotswapper, AnonymousClassPatch, Tomcat, Logback ....
|
||||||
disabledPlugins=
|
disabledPlugins=${hotswap.disabledPlugins}
|
||||||
|
|
||||||
# Watch for changed class files on watchResources path and reload class definition in the running application.
|
# Watch for changed class files on watchResources path and reload class definition in the running application.
|
||||||
#
|
#
|
||||||
|
@@ -3,6 +3,7 @@ JAVA_OPTS="${JAVA_OPTS} -Xms${JAVA_MEMORY_INIT} -Xmx${JAVA_MEMORY_MAX}"
|
|||||||
|
|
||||||
if [ "${ENABLE_HOTSWAP}" = "true" ]; then
|
if [ "${ENABLE_HOTSWAP}" = "true" ]; then
|
||||||
JAVA_OPTS="${JAVA_OPTS} -XX:HotswapAgent=external -javaagent:/usr/local/lib/jvm/hotswap-agent.jar"
|
JAVA_OPTS="${JAVA_OPTS} -XX:HotswapAgent=external -javaagent:/usr/local/lib/jvm/hotswap-agent.jar"
|
||||||
|
JAVA_OPTS="${JAVA_OPTS} -Dhotswap.disablePlugins=${DISABLE_HOTSWAP_PLUGINS}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${ENABLE_JDWP}" = "true" ]; then
|
if [ "${ENABLE_JDWP}" = "true" ]; then
|
||||||
|
Reference in New Issue
Block a user