Giter Club home page Giter Club logo

ukhomeoffice.hocs-info-service's Introduction

hocs-info-service

This is the Home Office Correspondence Service (HOCS) info service.

The HOCS project is comprised of a set of micro-services:

The source for this service can be found on GitHub.

Getting Started

Prerequisites

  • Java 8
  • Docker
  • Postgres
  • SQS
  • LocalStack

Build and Run the Service

Preparation

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

Running in an IDE

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.

Building and running without an IDE

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.

Flyway and database management

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.

Tests

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.

Deployment

See the pipeline for the steps involved in the build and deployment.

Running the HOCS project

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

Using the Service

Versioning

For versioning this project uses SemVer.

Authors

This project is authored by the Home Office.

License

This project is licensed under the MIT license. For details please see License

This project contains public sector information licensed under the Open Government Licence v3.0. (http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/)

ukhomeoffice.hocs-info-service's People

Contributors

abarker66 avatar agraham19 avatar hubert-raich avatar lcairns avatar leighkirkho avatar lewismuirhead avatar liammacp avatar markwrightbjss avatar nickmcmahon01 avatar nwoodho avatar parth-ho avatar paulcr-ho avatar raysonviswas avatar seanreedhomeoffice avatar simonmitchellhod avatar zuzak avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.