Skip to content
Snippets Groups Projects
user avatar
Brandon Clayton authored
fee2f13f
History

nshmp-ws-static

Serve Hazard and AASHTO NetCDF files from nshmp-netcdf-conversion.

Sub-Projects

The repository is split into gradle sub-projects:

  • aashto: Web services for AASHTO static NetCDF files
  • hazard: Web services for hazard static NetCDF files
  • lib: Common library for web services

AASHTO

Miconaut web services for AASHTO ground motions.

To run AASHTO web services, from root project directory run:

./gradle runAashto

Hazard

Micronaut web services for hazard curves.

To run hazard web services, from root project directory run:

./gradlew runHazard

Docker

Public Image

The web services can be pulled and ran from Docker hub given one of the four available tags:

  • usgs/nshmp-ws-static:development-latest - Is based on developer forks and is considered unstable
  • usgs/nshmp-ws-static:staging-latest - Is based on the main branch and is the latest
  • usgs/nshmp-ws-static:production-latest - Is based on the production branch and is stable
  • usgs/nshmp-ws-static:latest - Is based on the main branch

Pull Image

docker pull usgs/nshmp-ws-static:production-latest

Run Service

docker run -e SERVICE={service} -p 8080:8080 usgs/nshmp-ws-static:production-latest

Replace {service} with the service to run, either hazard or aashto

Run AASHTO Service
docker run -e SERVICE=hazard -p 8080:8080 usgs/nshmp-ws-static:production-latest
Run Hazard Service
docker run -e SERVICE=aashto -p 8080:8080 usgs/nshmp-ws-static:production-latest

Local Build

To build the Docker image locally run:

docker build --build-arg GITLAB_TOKEN="{gitlab_token}" -t nshmp-ws-static .

Replace {gitlab_token} with the GitLab API access token