Modelling architecture in HM Prisons and Probations Service (HMPPS) with the C4 model and Structurizr.
This repository defines a Structurizr workspace for the HM Prison and Probation Service.
For the model and diagrams, please visit https://structurizr.com/share/56937.
To link to a live version of a diagram, insert the following code into your repository's readme:
(Replace nomiscontainer
with the diagram key in the code)
[Container diagram source](https://github.com/ministryofjustice/hmpps-architecture-as-code/search?q=nomiscontainer)
![Container diagram](https://static.structurizr.com/workspace/56937/diagrams/nomiscontainer.png)
![Container diagram legend](https://static.structurizr.com/workspace/56937/diagrams/nomiscontainer-key.png)
The project is built with gradle
.
Action | Command |
---|---|
Build the project | ./gradlew build |
Create a local Structurizr workspace JSON file | ./gradlew run |
Push to the remote Structurizr workspace | ./gradlew run --args='--push' (please see "Secrets" section below) |
The remote workspace's content is replaced with the content in this repository. Remote-only changes will be lost.
The --push
command can be configured with these environment variables:
Environment variable | Meaning |
---|---|
STRUCTURIZR_API_KEY |
Required The API key for the Structurizr API. |
STRUCTURIZR_API_SECRET |
Required The API secret for the Structurizr API. |
STRUCTURIZR_WORKSPACE_ID |
Overrides the default workspace ID. |
Example:
STRUCTURIZR_WORKSPACE_ID=12345 \
STRUCTURIZR_API_KEY=key \
STRUCTURIZR_API_SECRET=secret \
./gradlew run --args='--push'
You can view these secrets on the dashboard, after clicking Show more... next to the desired workspace.
Requires graphviz
and wget
to be installed (e.g. with brew install graphviz wget
)
script/generate_images.sh
This command will locally generate all defined workspace diagrams without using the Structurizr web API.