-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
251 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM geonetwork/gn-cloud-ogc-api-records-service:4.4.3-0 | ||
|
||
COPY customisation\application.yml ogcapiconfig/. | ||
COPY customisation\bootstrap.yml ogcapiconfig/. | ||
|
||
ENV SPRING_PROFILES_ACTIVE=standalone \ | ||
SPRING_DATASOURCE_URL=jdbc:postgresql://${DB_HOST}:${POSTGRES_CONTAINER_PORT}/${POSTGRES_DATABASE_NAME_V4} \ | ||
SPRING_DATASOURCE_USERNAME=postgres \ | ||
SPRING_DATASOURCE_PASSWORD=${POSTGRES_PASSWORD} \ | ||
SPRING_CONFIG_LOCATION=/ogcapiconfig/ \ | ||
GN_BASEURL=${ES_PROTOCOL}://${APP_HOSTNAME}/geonetwork/api \ | ||
GN_LEGACY_URL=${ES_PROTOCOL}://${APP_HOSTNAME}/geonetwork \ | ||
GN_INDEX_URL=${ES_PROTOCOL}://${ELASTIC_HOST}:${ES_CONTAINER_PORT} \ | ||
GN_INDEX_RECORDS=${INDEX_NAME} \ | ||
GN_INDEX_USERNAME=elastic \ | ||
GN_INDEX_PASSWORD=${ELASTIC_PASSWORD} \ | ||
SERVER_FORWARDHEADERSSTRATEGY=FRAMEWORK \ | ||
JAVA_OPTS=-Dfile.encoding=UTF-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
gn: | ||
search: | ||
# Full text on all fields | ||
# 'queryBase': '${any}', | ||
# Full text but more boost on title match | ||
queryFilter: '+isTemplate:n' | ||
queryBase: '(any.\*:(${any}) OR resourceTitleObject.\*:(${any})^2)' | ||
trackTotalHits: true | ||
scoreConfig: > | ||
{ | ||
"boost": "5", | ||
"functions": [ | ||
{ // Boost down member of a series | ||
"filter": { "exists": { "field": "parentUuid" } }, | ||
"weight": 0.3 | ||
}, | ||
{ // Boost down obsolete records | ||
"filter": { "match": { "cl_status.key": "obsolete" } }, | ||
"weight": 0.3 | ||
}, | ||
{ | ||
"gauss": { | ||
"dateStamp": { | ||
"scale": "365d", | ||
"offset": "90d", | ||
"decay": 0.5 | ||
} | ||
} | ||
} | ||
], | ||
"score_mode": "multiply" | ||
} | ||
sortables: | ||
- "relevance" | ||
- "createDate:desc" | ||
- "resourceTitleObject.default.keyword" | ||
- "rating:desc" | ||
- "popularity:desc" | ||
formats: | ||
- name: html | ||
mimeType: text/html | ||
responseProcessor: JsonUserAndSelectionAwareResponseProcessorImpl | ||
operations: | ||
- root | ||
- conformance | ||
- collections | ||
- collection | ||
- items | ||
- item | ||
- | ||
name: xml | ||
mimeType: application/xml | ||
responseProcessor: XmlResponseProcessorImpl | ||
operations: | ||
- root | ||
- collections | ||
- collection | ||
- items | ||
- item | ||
- | ||
name: json | ||
mimeType: application/json | ||
responseProcessor: JsonUserAndSelectionAwareResponseProcessorImpl | ||
operations: | ||
- root | ||
- conformance | ||
- collections | ||
- collection | ||
- items | ||
- item | ||
- | ||
name : gn | ||
mimeType : application/gn+xml | ||
responseProcessor: XsltResponseProcessorImpl | ||
- | ||
name: opensearch | ||
mimeType: application/opensearchdescription+xml | ||
operations: | ||
- collection | ||
- | ||
name : schema.org | ||
mimeType : application/ld+json | ||
responseProcessor: JsonLdResponseProcessorImpl | ||
operations: | ||
- items | ||
- item | ||
- | ||
name: dcat | ||
mimeType: application/rdf+xml | ||
responseProcessor: DcatCatalogResponseProcessorImpl | ||
operations: | ||
- items | ||
- item | ||
- | ||
name : dcat_turtle | ||
mimeType : text/turtle | ||
responseProcessor: JsonUserAndSelectionAwareResponseProcessorImpl | ||
operations : | ||
- item | ||
# - | ||
# name : iso19139 | ||
# mimeType : application/iso19139+xml | ||
# responseProcessor: XsltResponseProcessorImpl | ||
# - | ||
# name : iso19115-3 | ||
# mimeType : application/iso19115-3+xml | ||
# responseProcessor: XsltResponseProcessorImpl | ||
- | ||
name : rss | ||
mimeType : application/rss+xml | ||
responseProcessor: RssResponseProcessorImpl | ||
operations: | ||
- items | ||
- | ||
name : geojson | ||
mimeType : application/geo+json | ||
responseProcessor: GeoJsonResponseProcessorImpl | ||
operations: | ||
- items | ||
- item | ||
defaultMimeType: text/html | ||
sources: | ||
- "resourceTitleObject" | ||
- "resourceAbstractObject" | ||
- "resourceType" | ||
- "overview" | ||
- "uuid" | ||
- "schema" | ||
- "link" | ||
- "allKeywords" | ||
- "contactForResource" | ||
- "cl_status" | ||
- "edit" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
server: | ||
port: 8080 | ||
# address: localhost | ||
# forward-headers-strategy: NATIVE | ||
# servlet: | ||
# context-path: /ogcapi | ||
instance-id: ${spring.application.name}:${spring.application.instance_id:${spring.cloud.client.ip-address}}:${server.port} | ||
servlet: | ||
encoding: | ||
charset: UTF-8 | ||
force-response: true | ||
spring: | ||
application.name: ogc-records-service | ||
main.banner-mode: off | ||
cloud: | ||
loadbalancer.ribbon.enabled: false # ribbon is in maintenance mode and should be replaced by spring-cloud-loadbalancer | ||
config: | ||
fail-fast: true | ||
retry: | ||
max-attempts: 20 | ||
discovery: | ||
enabled: true | ||
service-id: config-service | ||
|
||
eureka: | ||
instance: | ||
hostname: ${spring.application.name} | ||
instance-id: ${server.instance-id} | ||
preferIpAddress: true | ||
lease-expiration-duration-in-seconds: 30 | ||
lease-renewal-interval-in-seconds: 30 | ||
client: | ||
enabled: true | ||
registerWithEureka: true | ||
fetchRegistry: true | ||
registry-fetch-interval-seconds: 30 | ||
serviceUrl: | ||
defaultZone: ${eureka.server.url:http://localhost:8761/eureka} | ||
healthcheck: | ||
enabled: true | ||
|
||
--- | ||
# Use this profile when running on a GN4 database on localhost and Elasticsearch index. | ||
# Turn off security, config & discover. | ||
spring: | ||
profiles: standalone | ||
rabbitmq.host: localhost | ||
datasource: | ||
driver-class-name: org.postgresql.Driver | ||
url: jdbc:postgresql://localhost:5432/gn | ||
username: www-data | ||
password: www-data | ||
jpa: | ||
database-platform: org.hibernate.dialect.PostgreSQLDialect | ||
jpa.generate-ddl: false | ||
jpa.hibernate.ddl-auto: none | ||
cloud: | ||
config: | ||
discovery: | ||
enabled: false | ||
enabled: false | ||
management: | ||
health.ldap.enabled: false | ||
eureka: | ||
client: | ||
enabled: false | ||
registerWithEureka: false | ||
fetch-registry: false | ||
gn: | ||
baseurl: http://localhost:9901 | ||
language: | ||
default: eng | ||
legacy.url: http://localhost:8080/geonetwork | ||
index: | ||
url: http://localhost:9200 | ||
records: gn-records | ||
username: | ||
password: | ||
#logging.level: | ||
# org.springframework: DEBUG | ||
# org.hibernate.SQL: DEBUG | ||
# org.hibernate.type.descriptor.sql.BasicBinder: TRACE | ||
|
||
logging: | ||
level: | ||
# geonetwork roots | ||
org.fao.geonet: INFO | ||
org.fao.geonet.ogcapi: DEBUG | ||
org.fao.geonet.searching: DEBUG | ||
|
||
springfox: | ||
documentation: | ||
swaggerUi: | ||
baseUrl: /openapi | ||
openApi: | ||
v3: | ||
path: /openapi/v3/api-docs | ||
swagger: | ||
v2 : | ||
path: /openapi/v2/api-docs |