Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GNOS 4 Dockerfile #1

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
postgresql_data
esdata-public
logs
esdata-public2
logs2
52 changes: 52 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
FROM geonetwork:4.4.5

USER root
RUN apt -y update && apt -y upgrade && apt -y install vim git && apt clean
USER jetty

WORKDIR /opt/geonetwork
RUN git init . && git add . && git config --global user.email "[email protected]" && git config --global user.name "Your Name" && git commit -m 'Initial commit'
COPY patch /tmp/patch
RUN patch -p1 < /tmp/patch || true
COPY overrides/footer.html /opt/geonetwork/catalog/views/default/templates/footer.html
COPY overrides/top-toolbar.html /opt/geonetwork/catalog/templates/top-toolbar.html
COPY overrides/top-toolbar.html /opt/geonetwork/catalog/components/toolbar/partials/top-toolbar.html
COPY overrides/logo.png /opt/geonetwork/catalog/views/default/images/
RUN rm -rf /opt/geonetwork/catalog/templates/WEB-INF/data/wro4j-cache.mv.db
WORKDIR /var/lib/jetty

# COPY WEB-INF/config-db/jdbc.properties /var/lib/jetty/webapps/geonetwork/WEB-INF/config-db/jdbc.properties
# COPY WEB-INF/config-node/srv.xml /var/lib/jetty/webapps/geonetwork/WEB-INF/config-node/srv.xml
# COPY WEB-INF/config.properties /var/lib/jetty/webapps/geonetwork/WEB-INF/config.properties
# COPY catalog/components/search/mdview/partials/contact.html /var/lib/jetty/webapps/geonetwork/catalog/components/search/mdview/partials/contact.html
# COPY catalog/locales/de-core.json /var/lib/jetty/webapps/geonetwork/catalog/locales/de-core.json
# COPY catalog/locales/de-custom.json /var/lib/jetty/webapps/geonetwork/catalog/locales/de-custom.json
# COPY catalog/style/srv_custom_style.less /var/lib/jetty/webapps/geonetwork/catalog/style/srv_custom_style.less
# COPY catalog/style/gn_icons.less /var/lib/jetty/webapps/geonetwork/catalog/style/gn_icons.less
# COPY catalog/views/default/less/gn_results_default.less /var/lib/jetty/webapps/geonetwork/catalog/views/default/less/gn_results_default.less
# COPY catalog/views/default/less/gn_topics_default.less /var/lib/jetty/webapps/geonetwork/catalog/views/default/less/gn_topics_default.less
# COPY catalog/views/default/less/gn_variables_default.less /var/lib/jetty/webapps/geonetwork/catalog/views/default/less/gn_variables_default.less
# COPY catalog/views/default/templates/advancedSearchForm/defaultAdvancedSearchForm.html /var/lib/jetty/webapps/geonetwork/catalog/views/default/templates/advancedSearchForm/defaultAdvancedSearchForm.html
# COPY catalog/views/default/templates/footer.html /var/lib/jetty/webapps/geonetwork/catalog/views/default/templates/footer.html
# COPY catalog/views/default/templates/results.html /var/lib/jetty/webapps/geonetwork/catalog/views/default/templates/results.html
# COPY Gn.js /var/lib/jetty/webapps/geonetwork/catalog/js/Gn.js
# COPY log4j2.xml /var/lib/jetty/webapps/geonetwork/WEB-INF/classes/
# COPY summary.html /var/lib/jetty/webapps/geonetwork/catalog/views/default/templates/recordView/summary.html

# docker cp WEB-INF/config-db/jdbc.properties gnos:/var/lib/jetty/webapps/geonetwork/WEB-INF/config-db/jdbc.properties
# docker cp WEB-INF/config-node/srv.xml gnos:/var/lib/jetty/webapps/geonetwork/WEB-INF/config-node/srv.xml
# docker cp WEB-INF/config.properties gnos:/var/lib/jetty/webapps/geonetwork/WEB-INF/config.properties
# docker cp catalog/components/search/mdview/partials/contact.html gnos:/var/lib/jetty/webapps/geonetwork/catalog/components/search/mdview/partials/contact.html
# docker cp catalog/locales/de-core.json gnos:/var/lib/jetty/webapps/geonetwork/catalog/locales/de-core.json
# docker cp catalog/locales/de-custom.json gnos:/var/lib/jetty/webapps/geonetwork/catalog/locales/de-custom.json
# docker cp catalog/style/srv_custom_style.less gnos:/var/lib/jetty/webapps/geonetwork/catalog/style/srv_custom_style.less
# docker cp catalog/style/gn_icons.less gnos:/var/lib/jetty/webapps/geonetwork/catalog/style/gn_icons.less
# docker cp catalog/views/default/less/gn_results_default.less gnos:/var/lib/jetty/webapps/geonetwork/catalog/views/default/less/gn_results_default.less
# docker cp catalog/views/default/less/gn_topics_default.less gnos:/var/lib/jetty/webapps/geonetwork/catalog/views/default/less/gn_topics_default.less
# docker cp catalog/views/default/less/gn_variables_default.less gnos:/var/lib/jetty/webapps/geonetwork/catalog/views/default/less/gn_variables_default.less
# docker cp catalog/views/default/templates/advancedSearchForm/defaultAdvancedSearchForm.html gnos:/var/lib/jetty/webapps/geonetwork/catalog/views/default/templates/advancedSearchForm/defaultAdvancedSearchForm.html
# docker cp catalog/views/default/templates/footer.html gnos:/var/lib/jetty/webapps/geonetwork/catalog/views/default/templates/footer.html
# docker cp catalog/views/default/templates/results.html gnos:/var/lib/jetty/webapps/geonetwork/catalog/views/default/templates/results.html
# docker cp Gn.js gnos:/var/lib/jetty/webapps/geonetwork/catalog/js/Gn.js
# docker cp log4j2.xml gnos:/var/lib/jetty/webapps/geonetwork/WEB-INF/classes/
# docker cp summary.html gnos:/var/lib/jetty/webapps/geonetwork/catalog/views/default/templates/recordView/summary.html
7 changes: 7 additions & 0 deletions Dockerfile-original
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM geonetwork:4.4.5

USER root
RUN apt -y update && apt -y upgrade && apt -y install vim git && apt clean
USER jetty

WORKDIR /var/lib/jetty
81 changes: 81 additions & 0 deletions Gn.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
/*
* Copyright (C) 2001-2016 Food and Agriculture Organization of the
* United Nations (FAO-UN), United Nations World Food Programme (WFP)
* and United Nations Environment Programme (UNEP)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*
* Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2,
* Rome - Italy. email: [email protected]
*/

// Define root geonetwork namespace
var geonetwork = {};

(function () {
goog.provide("gn");

goog.require("gn_locale");
goog.require("gn_count_watchers");
goog.require("gn_polyfills");

/**
* Main gn module.
*
* Must be included by all uis.
* Is used in wro4j for $templatecache.
* Must contains only what is mendatory in all uis:
* - locale management
*
* @type {module|*}
*/
var module = angular.module("gn", ["gn_locale", "gn_config", "cfp.hotkeys"]);

// See https://docs.angularjs.org/guide/migration#commit-aa077e8
module.config([
"$locationProvider",
function ($locationProvider) {
// Configure existing providers
$locationProvider.hashPrefix("");
}
]);

window.addEventListener('hashchange', function() {
if (window.location.hash.startsWith('#/metadata')) {
this.window.setTimeout(function() {
var parents = document.querySelectorAll('.gn-metadata-display');
parents.forEach(function(parent) {
parent.querySelectorAll('a').forEach(function(a) {
var sameOrigin = a.href.startsWith('#') || a.href.startsWith(window.location.origin);
if (sameOrigin) {
delete a.target;
} else {
a.target = '_blank';
}
});
});
}, 1000);
}
if (window.location.hash.startsWith('#/search')) {
var nodes = document.querySelectorAll('[data-ng-click="next()"],[data-ng-click="previous()"]');
nodes.forEach(function(node) {
node.addEventListener('click', function() {
window.scrollTo(0, 0);
});
});
}
});

})();
8 changes: 4 additions & 4 deletions WEB-INF/config-db/jdbc.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
# Rome - Italy. email: [email protected]
#

jdbc.username=geonetwork
jdbc.password=gdibe_gn
jdbc.database=geonetwork
jdbc.host=10.10.114.113
jdbc.username=postgres
jdbc.password=postgres
jdbc.database=gnos
jdbc.host=postgres
jdbc.port=5432
jdbc.connectionProperties=#{systemEnvironment['GEONETWORK_DB_CONNECTION_PROPERTIES']}
jdbc.basic.removeAbandoned=true
Expand Down
34 changes: 19 additions & 15 deletions WEB-INF/config.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ usersavedselection.watchlist.frequency=0 0 4 * * ?
usersavedselection.watchlist.searchurl=catalog.search#/search?_uuid={{filter}}

# Define the link to each record sent by email by the watchlist notifier
usersavedselection.watchlist.recordurl=api/records/{{index:_uuid}}
usersavedselection.watchlist.recordurl=api/records/{{index:uuid}}

es.url=
es.protocol=http
es.port=9200
es.host=elasticsearch
es.url=${es.protocol}://${es.host}:${es.port}
es.username=
es.password=
es.index.features=
es.index.features.type=
es.index.features=gn-features
es.index.features.type=features
# Define the number of decimals to apply when converting geometries to GeoJSON
# Too high value means more volume. Adapt the value depending on the precision
# of the WFS harvested which usually allows to define a number of decimals
Expand All @@ -24,13 +27,15 @@ es.index.features.numberOfDecimals=8
# Force reduction of geometry precision based on the number of decimals
es.index.features.applyPrecisionModel=true
es.index.features.featureCommitInterval=250
es.index.records=
es.index.records.type=
es.index.records_public=
es.index.searchlogs=
es.index.searchlogs.type=
es.index.records=gn-records
es.index.records.type=records
es.index.records_public=${es.index.records_public}
es.index.searchlogs=gn-searchlogs
es.index.searchlogs.type=searchlogs

kb.url=
kb.url=http://kibana:5601

es.index.checker.interval=0/5 * * * * ?

jms.url=tcp://localhost:61616

Expand All @@ -40,14 +45,13 @@ api.params.maxPageSize=20000
api.params.maxUploadSize=100000000
urlChecker.UserAgent=GeoNetwork Link Checker

thesaurus.cache.maxsize=400000

map.bbox.background.service=https://sgx.geodatenzentrum.de/wms_basemapde?SERVICE=WMS&REQUEST=GetMap&VERSION=1.1.0&LAYERS=de_basemapde_web_raster_grau&STYLES=inspire_common:DEFAULT&SRS=25833&BBOX={minx},{miny},{maxx},{maxy}&WIDTH={width}&HEIGHT={height}&FORMAT=image/png

#map.bbox.background.service=https://isk.geobasis-bb.de/mapproxy/webatlasde/service/wms?SERVICE=WMS&amp;REQUEST=GetMap&amp;VERSION=1.1.0&amp;LAYERS=WebAtlasDE_BEBB_grau&amp;STYLES=default&amp;SRS={srs}&amp;BBOX={minx},{miny},{maxx},{maxy}&amp;WIDTH={width}&amp;HEIGHT={height}&amp;FORMAT=image/png

#map.bbox.background.service=https://ows.terrestris.de/osm/service?SERVICE=WMS&amp;REQUEST=GetMap&amp;VERSION=1.1.0&amp;LAYERS=OSM-WMS&amp;STYLES=default&amp;SRS={srs}&amp;BBOX={minx},{miny},{maxx},{maxy}&amp;WIDTH={width}&amp;HEIGHT={height}&amp;FORMAT=image/png
map.bbox.background.service=https://sgx.geodatenzentrum.de/wms_basemapde?SERVICE=WMS&amp;REQUEST=GetMap&amp;VERSION=1.1.0&amp;LAYERS=de_basemapde_web_raster_grau&amp;STYLES=inspire_common:DEFAULT&amp;SRS={srs}&amp;BBOX={minx},{miny},{maxx},{maxy}&amp;WIDTH={width}&amp;HEIGHT={height}&amp;FORMAT=image/png

# Set to false to enable the services to draw map extents (region.getmap and {metadatauuid}/extents.png) accepting
# urls for map services to provide the background layers. Otherwise the only allowed options are from the settings
# configuration or a named bg layer from regionGetMapBackgroundLayers.
metadata.extentApi.disableFullUrlBackgroundMapServices=true

db.migration_onstartup=true
6 changes: 3 additions & 3 deletions catalog/style/srv_custom_style.less
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
background-color: white;
}
.table-striped > tbody > tr:nth-of-type(2n+1) {
background-color: white
background-color: white
}
.gn-bottom-bar {
height: 50px;
Expand Down Expand Up @@ -148,7 +148,7 @@
background-color: white;
}
.navbar-default {
border-color:black;
border-color: black;
}
.gn-bottom-bar a:hover {
color: white !important;
Expand All @@ -171,5 +171,5 @@
.navbar-default .navbar-nav > li > a:focus, .navbar-default .navbar-nav > .open > a:focus, .navbar-default .navbar-nav > .active > a:focus {
background-color: transparent;
text-decoration: underline;
list-style-type: none !important;
}
.list-style-type: none !important;
4 changes: 4 additions & 0 deletions catalog/views/default/less/gn_variables_default.less
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,7 @@

// metadata page
@gn-md-view-background-color: @body-bg;
@gn-search-button-border-color: @btn-default-border;
@gn-outline: 2px auto @brand-primary;
@gn-search-button-border-color: @btn-default-border;
@gn-resultcard-title-border-color: @panel-default-border;

This file was deleted.

Loading