Added ability to pass JAVA_OPTS to java -jar cmd (#1)
* Added ability to pass JAVA_OPTS to java -jar cmd * Move JAVA_OPTS to __run_flags. * Add env var documentation in the README Co-authored-by: Andrés Bono <andresbono@vmware.com>
This commit is contained in:
parent
4f51e7b177
commit
046f1b43be
|
|
@ -45,6 +45,9 @@ export SPRING_CLOUD_SKIPPER_M2_DIR="/.m2"
|
|||
export SPRING_CLOUD_SKIPPER_DAEMON_USER="dataflow"
|
||||
export SPRING_CLOUD_SKIPPER_DAEMON_GROUP="dataflow"
|
||||
|
||||
# Java settings
|
||||
export JAVA_OPTS="${JAVA_OPTS:-}"
|
||||
|
||||
# Dataflow settings
|
||||
export SERVER_PORT="${SERVER_PORT:-}"
|
||||
export SPRING_CLOUD_CONFIG_ENABLED="${SPRING_CLOUD_CONFIG_ENABLED:-false}"
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ set -o pipefail
|
|||
info "** Starting Spring Cloud Skipper **"
|
||||
|
||||
__run_cmd="java"
|
||||
__run_flags=("-jar" "-Duser.home=${HOME}" "${SPRING_CLOUD_SKIPPER_BASE_DIR}/spring-cloud-skipper.jar" "--spring.config.additional-location=${SPRING_CLOUD_SKIPPER_CONF_FILE}" "$@")
|
||||
__run_flags=($JAVA_OPTS "-jar" "-Duser.home=${HOME}" "${SPRING_CLOUD_SKIPPER_BASE_DIR}/spring-cloud-skipper.jar" "--spring.config.additional-location=${SPRING_CLOUD_SKIPPER_CONF_FILE}" "$@")
|
||||
|
||||
if am_i_root; then
|
||||
exec gosu "$SPRING_CLOUD_SKIPPER_DAEMON_USER" "${__run_cmd}" "${__run_flags[@]}"
|
||||
|
|
|
|||
|
|
@ -82,6 +82,8 @@ If you are using MariaDB 10.2 or greater, you must also set the following enviro
|
|||
|
||||
Consult the [spring-cloud-skipper Reference Documentation](https://docs.spring.io/spring-cloud-skipper/docs/current/reference/htmlsingle/#_local_platform_configuration) to find the completed list of documentation.
|
||||
|
||||
In the same way, you might need to customize the JVM. Use the `JAVA_OPTS` environment variable for this purpose.
|
||||
|
||||
# Contributing
|
||||
|
||||
We'd love for you to contribute to this container. You can request new features by creating an [issue](https://github.com/bitnami/bitnami-docker-spring-cloud-skipper/issues), or submit a [pull request](https://github.com/bitnami/bitnami-docker-spring-cloud-skipper/pulls) with your contribution.
|
||||
|
|
|
|||
Loading…
Reference in New Issue