mirror of
				https://github.com/samply/bridgehead.git
				synced 2025-10-31 05:20:18 +01:00 
			
		
		
		
	Merge pull request #196 from samply/new-dashboard-backend
Add new/additional dashboard backend
This commit is contained in:
		
							
								
								
									
										25
									
								
								ccp/modules/fhir2sql-compose.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								ccp/modules/fhir2sql-compose.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,25 @@ | ||||
| version: "3.7" | ||||
|  | ||||
| services: | ||||
|   fhir2sql: | ||||
|     depends_on: | ||||
|       - "dashboard-db" | ||||
|       - "blaze" | ||||
|     image: docker.verbis.dkfz.de/cache/samply/fhir2sql:latest | ||||
|     container_name: bridgehead-ccp-dashboard-fhir2sql | ||||
|     environment: | ||||
|       BLAZE_BASE_URL: "http://bridgehead-ccp-blaze:8080" | ||||
|       PG_HOST: "dashboard-db" | ||||
|       PG_USERNAME: "dashboard" | ||||
|       PG_PASSWORD: "${DASHBOARD_DB_PASSWORD}" # Set in dashboard-setup.sh | ||||
|       PG_DBNAME: "dashboard" | ||||
|  | ||||
|   dashboard-db: | ||||
|     image: docker.verbis.dkfz.de/cache/postgres:${POSTGRES_TAG} | ||||
|     container_name: bridgehead-ccp-dashboard-db | ||||
|     environment: | ||||
|       POSTGRES_USER: "dashboard" | ||||
|       POSTGRES_PASSWORD: "${DASHBOARD_DB_PASSWORD}" # Set in dashboard-setup.sh | ||||
|       POSTGRES_DB: "dashboard" | ||||
|     volumes: | ||||
|       - "/var/cache/bridgehead/ccp/dashboard-db:/var/lib/postgresql/data" | ||||
							
								
								
									
										7
									
								
								ccp/modules/fhir2sql-setup.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								ccp/modules/fhir2sql-setup.sh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,7 @@ | ||||
| #!/bin/bash -e | ||||
|  | ||||
| if [ "$ENABLE_FHIR2SQL" == true ]; then | ||||
|   log INFO "Dashboard setup detected -- will start Dashboard backend and FHIR2SQL service." | ||||
|   OVERRIDE+=" -f ./$PROJECT/modules/fhir2sql-compose.yml" | ||||
|   DASHBOARD_DB_PASSWORD="$(echo \"This is a salt string to generate one consistent password for the Dashboard database. It is not required to be secret.\" | sha1sum | openssl pkeyutl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 30)" | ||||
| fi | ||||
							
								
								
									
										36
									
								
								ccp/modules/fhir2sql.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								ccp/modules/fhir2sql.md
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,36 @@ | ||||
| # fhir2sql | ||||
| fhir2sql connects to Blaze, retrieves data, and syncs it with a PostgreSQL database. The application is designed to run continuously, syncing data at regular intervals. | ||||
| The Dashboard module is a optional component of the Bridgehead CCP setup. When enabled, it starts two Docker services: **fhir2sql** and **dashboard-db**. Data held in PostgreSQL is only stored temporarily and Blaze is considered to be the 'leading system' or 'source of truth'. | ||||
|  | ||||
| ## Services | ||||
| ### fhir2sql | ||||
| * Image: docker.verbis.dkfz.de/cache/samply/fhir2sql:latest | ||||
| * Container name: bridgehead-ccp-dashboard-fhir2sql | ||||
| * Depends on: dashboard-db | ||||
| * Environment variables: | ||||
|   - BLAZE_BASE_URL: The base URL of the Blaze FHIR server (set to http://blaze:8080/fhir/) | ||||
|   - PG_HOST: The hostname of the PostgreSQL database (set to dashboard-db) | ||||
|   - PG_USERNAME: The username for the PostgreSQL database (set to dashboard) | ||||
|   - PG_PASSWORD: The password for the PostgreSQL database (set to the value of DASHBOARD_DB_PASSWORD) | ||||
|   - PG_DBNAME: The name of the PostgreSQL database (set to dashboard) | ||||
|  | ||||
| ### dashboard-db | ||||
|  | ||||
| * Image: docker.verbis.dkfz.de/cache/postgres:${POSTGRES_TAG} | ||||
| * Container name: bridgehead-ccp-dashboard-db | ||||
| * Environment variables: | ||||
|   - POSTGRES_USER: The username for the PostgreSQL database (set to dashboard) | ||||
|   - POSTGRES_PASSWORD: The password for the PostgreSQL database (set to the value of DASHBOARD_DB_PASSWORD) | ||||
|   - POSTGRES_DB: The name of the PostgreSQL database (set to dashboard) | ||||
| * Volumes: | ||||
|   - /var/cache/bridgehead/ccp/dashboard-db:/var/lib/postgresql/data | ||||
|  | ||||
| The volume used by dashboard-db can be removed safely and should be restored to a working order by re-importing data from Blaze. | ||||
|  | ||||
| ### Environment Variables | ||||
| * DASHBOARD_DB_PASSWORD: A generated password for the PostgreSQL database, created using a salt string and the SHA1 hash function. | ||||
| * POSTGRES_TAG: The tag of the PostgreSQL image to use (not set in this module, but required by the dashboard-db service). | ||||
|  | ||||
|  | ||||
| ### Setup | ||||
| To enable the Dashboard module, set the ENABLE_FHIR2SQL environment variable to true. The dashboard-setup.sh script will then start the fhir2sql and dashboard-db services, using the environment variables and volumes defined above. | ||||
		Reference in New Issue
	
	Block a user