Skip to content

Implementation of the Series REST API as a proxy in front of the AWI NearRealTime SOS.

Notifications You must be signed in to change notification settings

52North/awi-nearrealtime-series-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWI NearRealTime Series SOS Proxy

Implementation of the Series REST API as a proxy in front of the AWI NearRealTime SOS.

Configuration

Series API specific settings can be configured in src/main/resources/application.properties and <webapp>/classes/application.properties. Especially the external.url and series.database.* properties should be set here. The proxy uses a Postgres database for caching service metadata and uses these settings for the connection.

The SOS service(s) that should be harvested are configued in src/main/resources/config-data-sources.json and <webapp>/classes/config-data-sources.json respectively.

Logging is done using Logback and can be configured in src/main/resources/logback.xml and <webapp>/classes/logback.xml respectively.

Building

The service requires Java 8 and Maven:

mvn clean install

The WAR file can be found at target/de.awi.sos.api.war

Deployment

The WAR file can be deployed in a Java Application Server of your choice. Please adjust the configuration files (especially hibernate.properties either prior to building or in the WAR file.

Docker

There is a Dockerfile that creates a Jetty deployment:

docker build -t awi/nearrealtime-series-proxy:latest .
docker run -it -p 8080:8080 \
  -v ./logback.xml:/var/lib/jetty/webapps/ROOT/WEB-INF/classes/logback.xml:ro
  -v ./config-data-sources.json:/var/lib/jetty/webapps/ROOT/WEB-INF/classes/config-data-sources.json:ro
  -v ./application.properties:/var/lib/jetty/webapps/ROOT/WEB-INF/classes/application.properties:ro
  awi/nearrealtime-series-proxy:latest

Be aware that you have to link the database to the container or have both containers on the same Docker network.

After this the SOS should be accessible at http://localhost:8080/api/

A docker-compose example deployment can be found here.

About

Implementation of the Series REST API as a proxy in front of the AWI NearRealTime SOS.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published