Skip to content

Commit

Permalink
V2.23.0 (#518)
Browse files Browse the repository at this point in the history
* Upgraded GeoServer from version 2.22.2 to 2.23.0 and  revert web.xml changes and fix build logic
  • Loading branch information
NyakudyaA authored Apr 6, 2023
1 parent 66df007 commit 329e197
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 52 deletions.
10 changes: 5 additions & 5 deletions .env
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
COMPOSE_PROJECT_NAME=kartozageoserver

IMAGE_VERSION=9.0.71-jdk11-temurin-focal
GS_VERSION=2.22.2
IMAGE_VERSION=9.0.73-jdk11-temurin-focal
GS_VERSION=2.23.0
GEOSERVER_PORT=8600
# Build Arguments
JAVA_HOME=/usr/local/openjdk-11
WAR_URL=http://downloads.sourceforge.net/project/geoserver/GeoServer/2.22.2/geoserver-2.22.2-war.zip
JAVA_HOME=/opt/java/openjdk
WAR_URL=http://downloads.sourceforge.net/project/geoserver/GeoServer/2.23.0/geoserver-2.23.0-war.zip
STABLE_PLUGIN_BASE_URL=https://sourceforge.net/projects/geoserver/files/GeoServer
DOWNLOAD_ALL_STABLE_EXTENSIONS=1
DOWNLOAD_ALL_COMMUNITY_EXTENSIONS=1
Expand Down Expand Up @@ -94,7 +94,7 @@ TOGGLE_MASTER=true
TOGGLE_SLAVE=true
EMBEDDED_BROKER=enabled
# kartoza/postgis env variables https://github.com/kartoza/docker-postgis
POSTGIS_VERSION_TAG=14-3.1
POSTGIS_VERSION_TAG=15-3.3
POSTGRES_DB=gis,gwc
POSTGRES_USER=docker
POSTGRES_PASS=docker
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
##############################################################################

#--------- Generic stuff all our Dockerfiles should start with so we get caching ------------
ARG IMAGE_VERSION=9.0.71-jdk11-temurin-focal
ARG JAVA_HOME=/usr/local/openjdk-11
ARG IMAGE_VERSION=9.0.73-jdk11-temurin-focal
ARG JAVA_HOME=/opt/java/openjdk
FROM tomcat:$IMAGE_VERSION AS geoserver-prod

LABEL maintainer="Tim Sutton<[email protected]>"
ARG GS_VERSION=2.22.2
ARG GS_VERSION=2.23.0
ARG WAR_URL=https://downloads.sourceforge.net/project/geoserver/GeoServer/${GS_VERSION}/geoserver-${GS_VERSION}-war.zip
ARG STABLE_PLUGIN_BASE_URL=https://sourceforge.net/projects/geoserver/files/GeoServer
ARG DOWNLOAD_ALL_STABLE_EXTENSIONS=1
Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ The preferred way (but using most bandwidth for the initial image) is to
get our docker trusted build like this:

```shell
VERSION=2.22.2
VERSION=2.23.0
docker pull kartoza/geoserver:$VERSION
```
### Building the image
Expand Down Expand Up @@ -99,13 +99,13 @@ To build using a specific tagged release for tomcat image set the
to choose which tag you need to build against.

```
ie VERSION=2.22.2
docker build --build-arg IMAGE_VERSION=8-jre8 --build-arg GS_VERSION=2.22.2 -t kartoza/geoserver:${VERSION} .
ie VERSION=2.23.0
docker build --build-arg IMAGE_VERSION=8-jre8 --build-arg GS_VERSION=2.23.0 -t kartoza/geoserver:${VERSION} .
```

For some recent builds it is necessary to set the JAVA_PATH as well (e.g. Apache Tomcat/9.0.36)
```
docker build --build-arg IMAGE_VERSION=9-jdk11-openjdk-slim --build-arg JAVA_HOME=/usr/local/openjdk-11/bin/java --build-arg GS_VERSION=2.22.2 -t kartoza/geoserver:2.22.2 .
docker build --build-arg IMAGE_VERSION=9-jdk11-openjdk-slim --build-arg JAVA_HOME=/usr/local/openjdk-11/bin/java --build-arg GS_VERSION=2.23.0 -t kartoza/geoserver:2.23.0 .
```

**Note:** Please check the [GeoServer documentation](https://docs.geoserver.org/stable/en/user/production/index.html)
Expand Down Expand Up @@ -172,7 +172,7 @@ The image ships with the following stable plugins:
* csw-plugin

**Note:** The plugins listed above are omitted from [Stable_plugins.txt](https://github.com/kartoza/docker-geoserver/blob/master/build_data/stable_plugins.txt)
even though they are considered [stable plugins](https://sourceforge.net/projects/geoserver/files/GeoServer/2.22.2/extensions/)
even though they are considered [stable plugins](https://sourceforge.net/projects/geoserver/files/GeoServer/2.23.0/extensions/)
The image activates them on startup.

The image provides the necessary plugin zip files which are used when activating the
Expand All @@ -190,7 +190,7 @@ The environment variable `STABLE_EXTENSIONS` can be used to activate plugins lis
Example

```
ie VERSION=2.22.2
ie VERSION=2.23.0
docker run -d -p 8600:8080 --name geoserver -e STABLE_EXTENSIONS=charts-plugin,db2-plugin kartoza/geoserver:${VERSION}
```
Expand All @@ -211,7 +211,7 @@ The environment variable `COMMUNITY_EXTENSIONS` can be used to activate plugins
Example

```
ie VERSION=2.22.2
ie VERSION=2.23.0
docker run -d -p 8600:8080 --name geoserver -e COMMUNITY_EXTENSIONS=gwc-sqlite-plugin,ogr-datastore-plugin kartoza/geoserver:${VERSION}
```
Expand All @@ -229,7 +229,7 @@ Geoserver ships with sample data which can be used by users to familiarize them
This is not activated by default. You can activate it using the environment variable `SAMPLE_DATA=true`

```
ie VERSION=2.22.2
ie VERSION=2.23.0
docker run -d -p 8600:8080 --name geoserver -e SAMPLE_DATA=true kartoza/geoserver:${VERSION}
```
Expand Down Expand Up @@ -320,14 +320,14 @@ If you set the environment variable `SSL=true` but do not provide the pem files
the container will generate a self-signed SSL certificates.

```
ie VERSION=2.22.2
ie VERSION=2.23.0
docker run -it --name geoserver -e PKCS12_PASSWORD=geoserver -e JKS_KEY_PASSWORD=geoserver -e JKS_STORE_PASSWORD=geoserver -e SSL=true -p 8443:8443 -p 8600:8080 kartoza/geoserver:${VERSION}
```

If you already have your perm files (fullchain.pem and privkey.pem) you can mount the directory containing your keys as:

```
ie VERSION=2.22.2
ie VERSION=2.23.0
docker run -it --name geo -v /etc/certs:/etc/certs -e PKCS12_PASSWORD=geoserver -e JKS_KEY_PASSWORD=geoserver -e JKS_STORE_PASSWORD=geoserver -e SSL=true -p 8443:8443 -p 8600:8080 kartoza/geoserver:${VERSION}
```
Expand Down Expand Up @@ -403,7 +403,7 @@ To include Tomcat extras including docs, examples, and the manager webapp, set t
to use a strong password otherwise the default one is set up.

```
ie VERSION=2.22.2
ie VERSION=2.23.0
docker run -it --name geoserver -e TOMCAT_EXTRAS=true -p 8600:8080 kartoza/geoserver:${VERSION}
```

Expand All @@ -430,7 +430,7 @@ If you have downloaded extra fonts you can mount the folder to the path
path during initialisation.

```
ie VERSION=2.22.2
ie VERSION=2.23.0
docker run -v fonts:/opt/fonts -p 8080:8080 -t kartoza/geoserver:${VERSION}
```

Expand Down
1 change: 0 additions & 1 deletion build_data/community_plugins.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ flatgeobuf-plugin
gdal-wcs-plugin
gdal-wps-plugin
geopkg-plugin
geostyler-plugin
gpx-plugin
gsr-plugin
gwc-azure-blobstore-plugin
Expand Down
45 changes: 17 additions & 28 deletions build_data/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -596,36 +596,25 @@
so the entrypoint script can deactivate Cors settings if DISABLE_CORS is set -->
<!-- CORS_START -->
<filter>
<filter-name>CorsFilter</filter-name>
<filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
<init-param>
<param-name>cors.allowed.origins</param-name>
<param-value>*</param-value>
</init-param>
<init-param>
<param-name>cors.allowed.methods</param-name>
<param-value>GET,POST,HEAD,OPTIONS,PUT</param-value>
</init-param>
<init-param>
<param-name>cors.allowed.headers</param-name>
<param-value>Content-Type,X-Requested-With,accept,Origin,Access-Control-Request-Method,Access-Control-Request-Headers,If-Modified-Since,Range,Authorization</param-value>
</init-param>
<init-param>
<param-name>cors.exposed.headers</param-name>
<param-value>Access-Control-Allow-Origin,Access-Control-Allow-Credentials</param-value>
</init-param>
<init-param>
<param-name>cors.support.credentials</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>cors.preflight.maxage</param-name>
<param-value>10</param-value>
</init-param>
<filter-name>CorsFilter</filter-name>
<filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
<init-param>
<param-name>cors.allowed.origins</param-name>
<param-value>*</param-value>
</init-param>
<init-param>
<param-name>cors.allowed.headers</param-name>
<param-value>Content-Type,X-Requested-With,accept,Access-Control-Request-Method,Access-Control-Request-Headers,If-Modified-Since,Range,Origin,Authorization</param-value>
</init-param>
<init-param>
<param-name>cors.exposed.headers</param-name>
<param-value>Access-Control-Allow-Origin,Access-Control-Allow-Credentials</param-value>
</init-param>
</filter>

<filter-mapping>
<filter-name>CorsFilter</filter-name>
<url-pattern>/*</url-pattern>
<filter-name>CorsFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- CORS_END -->

Expand Down
4 changes: 2 additions & 2 deletions clustering/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
healthcheck:
test: "PGPASSWORD=docker pg_isready -h 127.0.0.1 -U docker -d gis"
master:
image: kartoza/geoserver:2.22.2
image: kartoza/geoserver:2.23.0
volumes:
- geoserver-cluster-data:/opt/geoserver/data_dir
ports:
Expand Down Expand Up @@ -50,7 +50,7 @@ services:
timeout: 10s
retries: 3
node:
image: kartoza/geoserver:2.22.2
image: kartoza/geoserver:2.23.0
volumes:
- geoserver-cluster-data:/opt/geoserver/data_dir
ports:
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ services:
- MAXIMUM_MEMORY=${MAXIMUM_MEMORY}
- STABLE_EXTENSIONS=${STABLE_EXTENSIONS}
- COMMUNITY_EXTENSIONS=${COMMUNITY_EXTENSIONS}
- GEOSERVER_CONTEXT_ROOT=${GEOSERVER_CONTEXT_ROOT}
depends_on:
db:
condition: service_healthy
Expand Down
2 changes: 1 addition & 1 deletion scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ fi

# Install jetty-servlets
if [[ -f ${GEOSERVER_HOME}/start.jar ]]; then
if [[ ! -f ${GEOSERVER_HOME}/webapps/${GEOSERVER_CONTEXT_ROOT/WEB-INF/lib/jetty-servlets.jar ]]; then
if [[ ! -f ${GEOSERVER_HOME}/webapps/${GEOSERVER_CONTEXT_ROOT}/WEB-INF/lib/jetty-servlets.jar ]]; then
validate_url https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-servlets/11.0.9/jetty-servlets-11.0.9.jar \
'-O "${GEOSERVER_HOME}"/webapps/${GEOSERVER_CONTEXT_ROOT}/WEB-INF/lib/jetty-servlets.jar'
fi
Expand Down

0 comments on commit 329e197

Please sign in to comment.