This is the HMPPS Probation Estate API. This is used to serve Probation estate information
- We need a postgres database to back the application and we can use a local docker one. The flyway scripts will deploy the schema and all lookup data we need for this application
- To launch the postgres docker container run the following:
docker compose up -d
- Open this repo in Intellij
- Right-click and Run
uk.gov.justice.digital.hmpps.hmppsprobationestateapi.HmppsProbationEstateApi
- This will fail initially but will have created a
Run Configuration
calledHmppsProbationEstateApi
in the configuration dropdown next to theRun
andDebug
buttons - Click on the
HmppsProbationEstateApi
configuration >Edit Configuration
- In the
VM Options
box paste the following:
-Dspring.profiles.active=local
- Save the configuration with the following:
- Click
Apply
- Click
OK
- Click
- You should now be able to
Run
andDebug
the application using this configuration by hitting theRun
andDebug
buttons next to the configuration - One the application is up and running
Execute the following command:
docker compose up -d
./gradlew bootRun -Dspring.profiles.active=local
These tests are defaults from the template, and the app only serves to run the flyway scripts. This allows you to test that the scripts work locally against postgresql in docker
docker compose up -d
./gradlew clean check
./gradlew ktlintApplyToIdea addKtlintFormatGitPreCommitHook
will apply ktlint styles to intellij and also add a pre-commit hook to format all changed kotlin files.