Skip to content

Commit

Permalink
feat(support): handle GN versions 4.4+, use ES 7.17
Browse files Browse the repository at this point in the history
minor improvements to init service to improve readability
  • Loading branch information
jahow committed Jul 23, 2024
1 parent ac9cd8e commit 31a0c25
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
1 change: 1 addition & 0 deletions support-services/.env
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
GEONETWORK_VERSION=4.2.2
ELASTICSEARCH_VERSION=7.17.15
25 changes: 18 additions & 7 deletions support-services/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ services:
- ./docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d

elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.15.1
image: docker.elastic.co/elasticsearch/elasticsearch:${ELASTICSEARCH_VERSION}
ulimits:
memlock:
soft: -1
Expand Down Expand Up @@ -80,15 +80,26 @@ services:
GEONETWORK_DB_NAME: geonetwork
GEONETWORK_DB_USERNAME: geonetwork
GEONETWORK_DB_PASSWORD: geonetwork
DATA_DIR: /catalogue-data
VIRTUAL_HOST: localhost

JAVA_OPTS: >
-Dorg.eclipse.jetty.annotations.AnnotationParser.LEVEL=OFF
-Djava.security.egd=file:/dev/./urandom -Djava.awt.headless=true
-Xms512M -Xss512M -Xmx2G -XX:+UseConcMarkSweepGC
-Dgeonetwork.resources.dir=/var/lib/jetty/webapps/geonetwork/WEB-INF/data/data/resources
-Dgeonetwork.data.dir=/var/lib/jetty/webapps/geonetwork/WEB-INF/data/data
-Dgeonetwork.codeList.dir=/var/lib/jetty/webapps/geonetwork/WEB-INF/data/config/codelist
-Dgeonetwork.schema.dir=/var/lib/jetty/webapps/geonetwork/WEB-INF/data/config/schema_plugins
-Xdebug -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=0.0.0.0:5005
-Dgeonetwork.resources.dir=/catalogue-data/data/resources
-Dgeonetwork.data.dir=/catalogue-data/data
-Dgeonetwork.codeList.dir=/catalogue-data/config/codelist
-Dgeonetwork.schema.dir=/catalogue-data/config/schema_plugins
-Dgeonetwork.config.dir=/catalogue-data/config
-Dgeonetwork.indexConfig.dir=/catalogue-data/config/index
-Des.host=elasticsearch
-Des.protocol=http
-Des.port=9200
-Des.url=http://elasticsearch:9200
-Des.username=
-Des.password=
depends_on:
database:
condition: service_healthy
Expand All @@ -104,7 +115,7 @@ services:
timeout: 10s
retries: 10
volumes:
- geonetwork_data:/var/lib/jetty/webapps/geonetwork/WEB-INF/data/
- geonetwork_data:/catalogue-data/
ports:
- '8080:8080'
- '5005:5005'
Expand All @@ -123,7 +134,7 @@ services:
init:
image: alpine/curl
# only run init if volumes were cleared
command: sh -c "if [ ! -f /done ]; then run-parts /docker-entrypoint.d --exit-on-error; else echo 'Nothing to do.'; exit 0; fi"
command: sh -c -e "if [ ! -f /done ]; then run-parts /docker-entrypoint.d --exit-on-error; else echo 'Nothing to do.'; exit 0; fi"
environment:
GEONETWORK_VERSION: ${GEONETWORK_VERSION}
depends_on:
Expand Down
1 change: 1 addition & 0 deletions support-services/docker-entrypoint.d/04-upload-thesauri.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ do
-H 'Accept: application/json, text/plain, */*' \
-H "Cookie: JSESSIONID=$jsessionid; XSRF-TOKEN=$xsrf_token" \
-H "X-XSRF-TOKEN: $xsrf_token"
echo ""
done

0 comments on commit 31a0c25

Please sign in to comment.