Closed pvgenuchten closed 10 months ago
Hi, since we work with containers, your answer makes sense. However, working inside the appBase
directory expose you to unexpected Tomcat automations.
Therefore, I would recommand this approach (working here :https://github.com/elasticlabs/geospatial-metadata-catalogue ):
Dockerfile
:[...]
ENV INSTALL_DIR /usr/local/geonetwork
ENV DATA_DIR=/var/lib/geonetwork_data
[...]
http://nightlybuild.geonetwork-opensource.org/3.10.x/geonetwork-3.10.3-SNAPSHOT-2020-06-04.war && \
mkdir -p $INSTALL_DIR && \
unzip -e $GN_FILE -d $INSTALL_DIR && \
rm $GN_FILE
#Copy context file
COPY conf/ROOT.xml $CATALINA_HOME/conf/Catalina/localhost/ROOT.xml
#Set geonetwork data dir
COPY conf/entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["catalina.sh", "run"]
ROOT.xml
fileMatch your directory setup.
I think it's a better to directly generate ROOT.xml
file during the container setup inside the Dockerfile
and will do accordingly i a near future.
<Context path="" docBase="/usr/local/geonetwork" />
Since version 4.4.0
you can use WEBAPP_CONTEXT_PATH
environment variable to define the context path where GN will be deployed. For example:
WEBAPP_CONTEXT_PATH=/catalogue
will deploy GN at http://localhost:8080/geonetworkWEBAPP_CONTEXT_PATH=/
will deploy GN at http://localhost:8080/
Currently when you access localhost:port you get some file-not-found error, you have to navigate to
/geonetwork
to open the applicationInstead would be better to install geonetwork at root, by:
ROOT.war
In case of context GeoNetwork can be deployed in
/opt/webapps/geonetwork
Example of tomcat context: