Skip to content
On this page

Installation

INFO

This section will provide installation instructions for installing a PHT Station.
It assumes that the station has been registered in the UI.
For instructions on how to register the station see the instructions here.

Requirements

  • Docker and docker-compose need to be installed.
  • For the default installation to work the ports 8080 and 5432 need to be available on localhost.

Setup

Warning

If the station is set up on windows, the changes described here must be made, before executing the following steps.

  1. Clone the repository: git clone https://github.com/PHT-Medic/station.git

  2. Navigate into the cloned project cd station and edit the .env file with your local configuration and the credentials you received after the Public key registration.
    Note: The .env.tmpl file is a template file that can be used to generate a .env file with the correct environment keys.

AttributeExplanation
STATION_IDChosen identifier of the station (match central UI configuration). You can find it as namespace
STATION_PRIVATE_KEY_PATHPath to the private key on the local filesystem that should be mounted as a volume
PRIVATE_KEY_PASSWORDIf the private key is encrypted with a password, this password can be set using this variable
AIRFLOW_USERAdmin user to be created for the airflow instance
AIRFLOW_PWPassword for the airflow admin user
HARBOR_URLUrl of the central harbor instance
HARBOR_USERUsername to authenticate against harbor
HARBOR_PWPassword to authenticate against harbor
STATION_DATA_DIRAbsolute path of the directory where the station stores the input data for trains.
This path is also used by the FHIR client to store the query results before passing them to the trains
FHIR_ADDRESS
(optional)
Address of the default FHIR server connected to the station
(this can also be configured per train)
FHIR_USER
(optional)
Username to authenticate against the FHIR server using Basic Auth
FHIR_PW
(optional)
Password for FHIR server Basic Auth
FHIR_TOKEN
(optional)
Token to authenticate against the FHIR server using Bearer Token
CLIENT_ID
(optional)
Identifier of client with permission to acces the FHIR server
CLIENT_SECRET
(optional)
Secret of above client to authenticate against the provider
OIDC_PROVIDER_URL
(optional)
Token url of Open ID connect provider
(e.g. keycloak, that is configured for the FHIR server)
FHIR_SERVER_TYPE
(optional)
Type of FHIR server
(PHT FHIR client supports IBM, Hapi and Blaze FHIR servers)
  1. Create a volume for the station: docker volume create pg_station
  2. Build the images by running: docker-compose build

Execution

  1. Run docker-compose up -d
  2. Check that the logs do not contain any startup errors with docker-compose logs -f
  3. Go to http://localhost:8080 nd check whether you can see the web interface of Apache Airflow
  4. Login to the airflow web interface with the previously set user credentials