refactor: Changed Paths for persistent Data

This commit is contained in:
Torben Brenner
2023-01-17 08:56:02 +01:00
parent 4efe356005
commit 1c3fa4fa3f
6 changed files with 19 additions and 22 deletions

View File

@ -71,6 +71,6 @@ services:
POSTGRES_DB: "mainzelliste"
POSTGRES_PASSWORD: ${PATIENTLIST_POSTGRES_PASSWORD}
volumes:
- "/var/data/bridgehead/patientlist:/var/lib/postgresql/data"
# NOTE: Add backups here. This is only imported if /var/data/bridgehead/patientlist/ is empty!!!
- "/var/lib/bridgehead/data/patientlist:/var/lib/postgresql/data"
# NOTE: Add backups here. This is only imported if /var/lib/bridgehead/data/patientlist/ is empty!!!
- "/tmp/bridgehead/patientlist/:/docker-entrypoint-initdb.d/"

View File

@ -26,7 +26,7 @@ Upon configuration, the Bridgehead will spawn the following services:
- The `bridgehead-id-manager` at https://bridgehead.local/id-manager, provides a common interface for creating pseudonyms in the bridgehead.
- The `bridgehead-patientlist` at https://bridgehead.local/patientlist is a local instance of the open-source software [Mainzelliste](https://mainzelliste.de). This service's primary task is to map patients IDAT to pseudonyms identifying them along the different CCP projects.
- The `bridgehead-patientlist-db` is only accessible within the Bridgehead itself. This is a local postgresql instance storing the database for `bridgehead-patientlist`. The data is persisted in `/var/data/bridgehead/patientlist` and backups are automatically created in `/var/data/bridgehead/backups/bridgehead-patientlist-db`.
- The `bridgehead-patientlist-db` is only accessible within the Bridgehead itself. This is a local postgresql instance storing the database for `bridgehead-patientlist`. The data is persisted in `/var/lib/bridgehead/data/patientlist` and backups are automatically created in `/var/cache/bridgehead/backup/bridgehead-patientlist-db`.
### How to import an existing database (e.g from Legacy Windows or from Backups)
First you must shutdown your local bridgehead instance:
@ -36,10 +36,10 @@ systemctl stop bridgehead@ccp
Next you need to remove the current patientlist database:
```
rm -rf /var/data/bridgehead/patientlist
rm -rf /var/lib/bridgehead/data/patientlist
```
Third, you need to place your postgres dump in the import directory `/tmp/bridgehead/patientlist/some-dump.sql`. This will only be imported, then /var/data/bridgehead/patientlist is empty.
Third, you need to place your postgres dump in the import directory `/tmp/bridgehead/patientlist/some-dump.sql`. This will only be imported, then /var/lib/bridgehead/data/patientlist is empty.
> NOTE: Please create the postgres dump with the options "--no-owner" and "--no-privileges". Additionally ensure the dump is created in the plain format (SQL).
After this, you can restart your bridgehead and the dump will be imported:

View File

@ -24,7 +24,7 @@ services:
- "traefik.http.routers.mtba.tls=true"
volumes:
# This directory persists the FHIR Resources that are needed to import data into blaze.
- /var/data/bridgehead/mtba:/app/mtba-files/persist
- /var/lib/bridgehead/data/mtba:/app/mtba-files/persist
# Place new import files in this directory
- /tmp/bridgehead/mtba/:/app/mtba-files/input