Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/defra/ffc-mpdp-backend
Making Payment Data Public
https://github.com/defra/ffc-mpdp-backend
Last synced: 6 days ago
JSON representation
Making Payment Data Public
- Host: GitHub
- URL: https://github.com/defra/ffc-mpdp-backend
- Owner: DEFRA
- License: other
- Created: 2022-09-09T08:03:00.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-08T11:05:34.000Z (11 days ago)
- Last Synced: 2024-11-08T11:23:28.352Z (11 days ago)
- Language: JavaScript
- Size: 464 KB
- Stars: 3
- Watchers: 6
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: changelog/db.changelog-1.0.xml
Awesome Lists containing this project
README
# FFC MPDP Backend Service
> Backend service for the Making Payment Data Public
## Prerequisites
- Docker
- Docker ComposeOptional:
- Kubernetes
- Helm |## Running the application
The application is designed to run in containerised environments, using Docker Compose in development and Kubernetes in production.
- A Helm chart is provided for production deployments to Kubernetes.
### Build container image
Container images are built using Docker Compose, with the same images used to run the service with either Docker Compose or Kubernetes.
When using the Docker Compose files in development the local `app` folder will
be mounted on top of the `app` folder within the Docker container, hiding the CSS files that were generated during the Docker build. For the site to render correctly locally `npm run build` must be run on the host system.By default, the start script will build (or rebuild) images so there will
rarely be a need to build images manually. However, this can be achieved
through the Docker Compose
[build](https://docs.docker.com/compose/reference/build/) command:```
# Build container images
docker-compose build
```### Start
The core search funcationality relies on the ffc-mpdp-frontend service to connect to a running instance of the this service. In order to allow the two applications from separate containers to connect to each other they must both share a common network bridge.
For convenience a start script is present in ./scripts/start which can setup the bridge and launch this serviceFor a manual approach run the following command in the given order. The first command to create network is only required to run initially once, so you can skip this step when starting up Frontend service. Likewise, if you have ran this command while starting Frontend service, then ignore this step here.
```
# Create network
docker network create ffc-mpdp# Use Docker Compose to build the container and run service locally.
docker-compose -f docker-compose.yaml -f docker-compose.override.yaml -f docker-compose.link.yaml up --build
```
## Test structureThe tests have been structured into subfolders of `./test` as per the
[Microservice test approach and repository structure](https://eaflood.atlassian.net/wiki/spaces/FPS/pages/1845396477/Microservice+test+approach+and+repository+structure)### Running tests
A convenience script is provided to run automated tests in a containerised
environment. This will rebuild images before running tests via docker-compose,
using a combination of `docker-compose.yaml` and `docker-compose.test.yaml`.
The command given to `docker-compose run` may be customised by passing
arguments to the test script.Examples:
```
# Run all tests
scripts/test# Run tests with file watch
scripts/test -w
```## CI pipeline
This service uses the [FFC CI pipeline](https://github.com/DEFRA/ffc-jenkins-pipeline-library)
## Licence
THIS INFORMATION IS LICENSED UNDER THE CONDITIONS OF THE OPEN GOVERNMENT LICENCE found at:
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.