Docker

Local Build

This projects contains a Dockerfile that can be built and ran.

Build Docker Image

Example :
docker build \
  --build-arg BASE_HREF=<some/path> \
  nshmp-apps .

Note: Replace <some/path> with an appropritate base href

Example:

Example :
docker build \
  --build-arg BASE_HREF=nshmp \
  nshmp-apps .

Run Docker Image

Example :
docker run -p <PORT>:8080 nshmp-apps

Note: Replace <PORT> with an appropriate port to run the application.

Example:

Example :
docker run -p 8080:8080 nshmp-apps

Docker Registry

nshmp-apps is available as a public image from the GitLab registry with tags:

  • latest,staging-latest: Latest updates associated with the main branch
  • production-latest: Latest stable release associated with a tag

Pull Image

To ensure you have the latest nshmp-apps update associated with a specific tag, always first pull the image from Docker:

Example :
docker pull code.usgs.gov:5001/ghsc/nshmp/nshmp-apps/nshmp-apps:<tag>

Replace <tag> with one of the above tags.

Example:

Example :
docker pull code.usgs.gov:5001/ghsc/nshmp/nshmp-apps/nshmp-apps:latest

Run Registry Image

Example :
docker run -p 8080:8080 code.usgs.gov:5001/ghsc/nshmp/nshmp-apps/nshmp-apps:latest

Docker Environment Variables

By default the backend web services that nshmp-apps calls use https://earthquake.usgs.gov as the default, this can be changed by setting the BASE_SERVICE_URL environment variable:

Example :
docker run -p 8080:8080 -e BASE_SERVICE_URL="" code.usgs.gov:5001/ghsc/nshmp/nshmp-apps/nshmp-apps:latest

Previous: Web Service Configuration     Next: Development

results matching ""

    No results matching ""