Add flag to control download of extensions at run time

pull/1/head
Nils Bühner 2020-12-17 18:11:00 +01:00
parent ed60742751
commit a4e3a83816
5 changed files with 12 additions and 7 deletions

View File

@ -12,6 +12,7 @@ ENV GS_VERSION=${GS_VERSION} \
INITIAL_MEMORY="2G" \
MAXIMUM_MEMORY="4G" \
JAIEXT_ENABLED=true \
DOWNLOAD_EXTENSIONS=false \
STABLE_EXTENSIONS='' \
DEBIAN_FRONTEND=noninteractive \
EXTENSION_DOWNLOAD_DIR=/opt/geoserver_extension_downloads \

View File

@ -43,6 +43,7 @@ Pass as environment variables. If not passed, the default values will be used.
* `INITIAL_MEMORY` (default: 2G)
* `MAXIMUM_MEMORY` (default: 4G)
* `JAIEXT_ENABLED` (default: true)
* `DOWNLOAD_EXTENSIONS` (default: false)
* `STABLE_EXTENSIONS` as comma separated list, will be downloaded and installed on startup (default: "")
## TODOs

View File

@ -6,6 +6,7 @@ services:
ports:
- 8080:8080
environment:
- DOWNLOAD_EXTENSIONS=true
- STABLE_EXTENSIONS=wps
- INITIAL_MEMORY=1G
- MAXIMUM_MEMORY=2G

View File

@ -3,9 +3,7 @@
set -e
## install GeoServer extensions before starting the tomcat
echo "Starting installation of extensions"
/scripts/install-extensions.sh
echo "\nFinished installation of extensions"
export GEOSERVER_OPTS="-Djava.awt.headless=true -server \
-Dfile.encoding=UTF8 \

View File

@ -14,8 +14,12 @@ function download_extension() {
fi
}
# Install stable plugins
# Install stable plugins only if DOWNLOAD_EXTENSIONS is true
if [ "$DOWNLOAD_EXTENSIONS" = "true" ]; then
echo "Starting installation of extensions"
for EXTENSION in $(echo "${STABLE_EXTENSIONS}" | tr ',' ' '); do
URL="${STABLE_PLUGIN_URL}/geoserver-${GS_VERSION}-${EXTENSION}-plugin.zip"
download_extension ${URL} ${EXTENSION}
done
echo "Finished installation of extensions"
fi