Skip to content

Running the Standard Reports Manager

Bogdan Marc edited this page Sep 6, 2024 · 2 revisions

The application connects to the Standard Reports Manager service to submit requests.

The easiest way to do this is as a local docker container. The image can be built from standard reports manager repository. or pulled from the Amazon Elastic Container Registry ECR.

Building and running from standard reports manager repository

To build and a run a new docker image check out the standard reports manager repository and run

make image run

Running an existing ECR image

Obtaining an ECR image requires:

  • AWS IAM credentials to connect to the HMLR AWS account
  • the ECR credentials helper installed locally (see here)
  • Set the contents of your ~/.docker/config.json file to be:
{
 "credsStore": "ecr-login"
}

This configures the Docker daemon to use the credential helper for all Amazon ECR registries.

To use a credential helper for a specific ECR registry, create a credHelpers section with the URI of your ECR registry:

{
  [...]
  "credHelpers": {
    "public.ecr.aws": "ecr-login",
    "018852084843.dkr.ecr.eu-west-1.amazonaws.com": "ecr-login"
  }
}

Once you have a local copy of you required image, it is advisable to run a local docker bridge network to mirror production and development environments.

Running a client application as a docker image from their respective Makefiles will set this up automatically, but to confirm run

docker network inspect dnet

To create the docker network run

docker network create dnet

Running as a docker container

Take a copy of the latest Manager development configuation file

wget -O test/fixtures/conf/app.conf https://raw.githubusercontent.com/epimorphics/standard-reports-manager/master/dev/app.conf
docker run --network dnet -p 8081:8080 --rm --name standard-reports-manager \
    -v $(pwd)/test/fixtures/conf/app.conf:/etc/standard-reports/app.conf \
    018852084843.dkr.ecr.eu-west-1.amazonaws.com/epimorphics/standard-reports-manager/dev:0.1.1_5ebbea4_00000030

the latest image can be found here dev and production.

The full list of versions can be found at AWS ECR

Note: port 8080 should be avoided to allow for a reverse proxy to run on this port.

With this set up, the api service is available on http://localhost:8081 from the host or http://standard-reports-manager:8080 from inside other docker containers.