⚠️ Please do not deploy this application to a Production Environment - read the Web Application Security Assessment for more information.
This Proof of Concept (PoC) is to demonstrate the feasibility and value in having an API the enables the ability to identify users across multiple Ministry of Justice (MoJ) tools and services
This section will detail the specifics of working with the Python Flask API and how to get the application running locally 🧑💻
Before developing/testing locally, ensure you have the following tools installed
- python3
- docker
- docker-compose
To enable the provisioning of a quick local environment, the repository comes with the following docker-compose files:
To spin up the entire application you can use the docker-compose-full.yaml
, for example
docker-compose -f ./docker-compose-full.yaml up --build -d
This is useful for quickly testing the application locally 🧪
To only spin up the application infrastructure, but not the application itself, you can use
the docker-compose-full.yaml
, for example
docker-compose -f ./docker-compose-local.yaml up --build -d
This is useful for setting up the infrastructure of the application, enabling the actual application to be started in a debug setting (typically using a IDE) 🐛
You can run the application through flask by using the following command
flask run --host 0.0.0.0
NOTE: 👆 This will throw an exception if a local database is not running
python -m pytest -v