Health Gateway is a system that allows a citizen to authorize the tranfer of his/her clinical data from a Source to a Destination
To run Health Gateway locally you will need docker [https://www.docker.com/] and docker-compose. The development environment we'll run, with all the hgw services, one Destination and one Source. To run the HGW follow this steps
-
Clone the repository
-
Create the development certs move into certs/ dir and then follow one of the two steps
- METHOD 1: run the script
generate_development.sh
. This will create a ca/ directory with all the necessary files Use 'hgwpwd' as a password for certificates. - METHOD 2: if you don't have bash (i.e., you're using Windows) you can build the docker images by running
docker build -t hgw_certs and .
- METHOD 1: run the script
-
-
(optional) install virtualenvwrapper to manage python environments:
sudo apt install virtualenvwrapper mkvirtualenv <env_name> -p python3
-
Install docker and generic dependencies https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-using-the-repository
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository "deb https://download.docker.com/linux/ubuntu bionic stable" sudo apt install docker-ce docker-ce-cli containerd.io docker-compose build-essential
-
-
Move to
docker/environments/development
directory and to run all the services launchmake run_with_tscns
-
To stop the service run:
make down_with_tscns
To make the development environment work you need to add the following entries to your file host:
127.0.0.1 consentmanager
127.0.0.1 destinationmockup
127.0.0.1 spid-testenv-identityserver
127.0.0.1 spid-testenv-backoffice
127.0.0.1 hgwbackend
127.0.0.1 hgwfrontend
127.0.0.1 kafka
127.0.0.1 tscns
To interact with the local environment, the endpoints are as it follows:
https://hgwfrontend:8000
https://consentmanager:8002
https://hgwbackend:8003
https://destinationmockup:8001
to use Postman, go to:
File > Settings > General > SSL Certificate Verification
and turn it OFF