Skip to content

Latest commit

 

History

History
69 lines (47 loc) · 2.05 KB

README.md

File metadata and controls

69 lines (47 loc) · 2.05 KB

hmpps-organisations-api

repo standards badge Docker Repository on ghcr API docs

API to support the creation, management and sharing of data related to organisations which are external to HMPPS. These organisations are referred to as CORPORATES within NOMIS.

Building the project

Tools required locally

  • JDK v21+
  • Kotlin plugin (Intellij)
  • docker
  • docker-compose

Installing gradle

./gradlew
./gradlew clean build

Running the application locally

There are two environment variables which need to be supplied locally. The most common way is to create a file called .env and to set the two values within it. These values should be obtained from the development team.

Set environment variables

SYSTEM_CLIENT_ID=<system.client.id>
SYSTEM_CLIENT_SECRET=<system.client.secret>

Run a docker Postsgresql database container

docker-compose pull && docker-compose up -d

This will download and run a docker Postgresql database within your docker environment and make it available on localhost:5432 to used.

Run the application

Provided you have the environment variables set correctly, and access to the development environment APIs (via VPN), you can start the application with:

./run-local.sh

Running the test suite

./gradlew test

Gradle tasks

To see the full list of tasks available:

./gradlew tasks