This is the Home Office Correspondence Service (HOCS) info service.
The HOCS project is comprised of a set of micro-services:
- hocs-workflow: models the business processes between the services
- hocs-frontend: the UI service, implemented in Node and React.
- hocs-casework: handles the data for each correspondence case.
- hocs-info-service: manages static data and data retrieved through external APIs
- hocs-docs: manages processing and storage of documents
- hocs-audit: receives and stores audit events.
The source for this service can be found on GitHub.
Java 8
Docker
Postgres
SQS
LocalStack
In order to run the service locally, a postgres database, SQS queues, and LocalStack are required. These are available through the docker-compose.yml file.
To start postgres, sqs, and localstack containers through Docker, from the root of the project run
docker-compose up
In order to stop the containers, run
docker-compose down
If you are using an IDE, such as IntelliJ, this service can be started by running the HocsInfoServiceApplication
main class.
The service can then be accessed at http://localhost:8085
.
This service is built using Gradle. In order to build the project from the command line, run
gradle clean build
in the root of the project.
Alternatively, the corresponding Docker image for this service is available at quay.io.
When changes are made to the postgres database through the service they are tracked with Flyway. Any changes which are not tracked will require the database to be restarted. To restart the database, from the root of the project run
docker-compose stop postgres
and when stopped, restart it by running
docker-compose start postgres
and there will be a new instance of postgres.
The suite of tests includes unit tests for the resource and services classes, and integration tests. In order to run the integration tests, an instance of postgres must be running.
See the pipeline for the steps involved in the build and deployment.
The entire set of services can be run in Docker containers from the
hocs-frontend project. Navigate to /docker
from the frontend directory, then run
./scripts/infrastructure.sh
to initiate the infrastructure service containers. These include the postgres, SQS, and LocalStack images. When the containers are set up and the services have completed starting, then run
./scripts/services.sh
to launch the set of HOCS micro-services.
To stop and clear the service containers run
./scripts/clean.sh
For versioning this project uses SemVer.
This project is authored by the Home Office.
This project is licensed under the MIT license. For details please see License