Skip to content

DEFRA/ffc-pay-report-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Payment Hub Report Generator

Microservice to periodically generate reports from Payment Hub event store.

This service is part of the Payment Hub.

Prerequisites

Optional:

Setup

Configuration

These configuration values should be set in the docker-compose.yaml file or Helm values file if running Kubernetes.

Name Description
APPINSIGHTS_CLOUDROLE Azure App Insights cloud role
APPINSIGHTS_CONNECTIONSTRING Azure App Insights connection string

Docker

Docker Compose can be used to build the container image.

docker compose build

The service will start with application and test code volume mappings so no need to rebuild the container unless a change to an npm package is made.

How to start the service

The service can be run using the start script.

./scripts/start

This script accepts any Docker Compose Up argument.

Debugging

A debugger can be attached to the running application using port 9290.

How to get an output

The service will periodically read events from a payment Azure Table Storage and write a reports Azure Blob Storage container.

You can use the Azure Storage Explorer to view the contents of Azure Storage.

The execute script can be used to manually trigger the report generation process.

./scripts/execute

When deployed to Kubernetes, a Cron Job will trigger report generation every hour. This value can be configured through the Helm chart.

How to stop the service

The service can be stopped using the stop script.

./scripts/stop

The script accepts any Docker Compose Down argument.

For example, to stop the service and clear all data volumes.

./scripts/stop -v

How to test the service

The service can be tested using the test script.

./scripts/test

The script accepts the following arguments:

  • --watch/-w - run tests with file watching to support Test Driven Development scenarios (TDD)
  • --debug/-d - run tests in debug mode. Same as watch mode but will wait for a debugger to be attached before running tests.

CI pipeline

This service uses the FFC CI pipeline.

Licence

THIS INFORMATION IS LICENSED UNDER THE CONDITIONS OF THE OPEN GOVERNMENT LICENCE found at:

http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3

The following attribution statement MUST be cited in your products and applications when using this information.

Contains public sector information licensed under the Open Government license v3

About the licence

The Open Government Licence (OGL) was developed by the Controller of Her Majesty's Stationery Office (HMSO) to enable information providers in the public sector to license the use and re-use of their information under a common open licence.

It is designed to encourage use and re-use of information freely and flexibly, with only a few conditions.