Docker compose project to spawn the required system components that make up the KT2 architecture: A FHIR store, an IDP, an Authorization service and the Domain service.
$> docker-compose pull
$> docker-compose up
# [...]run tests etc.[...]
$> docker-compose down -v
NOTE how the down -v
command will delete the containers and their data.
This setup's intention it to aid in (automated) test setups where a
deterministic and known initial state is required. When running the containers,
the underlying Postgres database is restored with:
testrunner
testrunner
552bfe09-3ea6-4bf8-9ecc-876276934aaa
Once the containers are running you can access the services:
./secrets
. The public key will automatically be added
to the database. NOTE: Keep in mind, if you change the key pair, the
03-update-publickey.sql
query will not be executed as the initdb.d
is
only executed when the db is not initialized yet.By default, this project restores database dumps in order to start quickly and provide a deterministic state. However, this causes maintenance issues. When the database scheme changes, this can cause problems. As a solution, this project provides the build_and_dump folder.
NOTE: This script will throw away all existing data from the volume! Click on the link to see the build_and_dump README for more information.
Keycloak is always populated with a config file against an empty database. If you wish to extend the config file, execute the following command after the Keycloak state is correct.
docker exec kt2_keycloak /opt/keycloak/bin/kc.sh export --realm kt2 --file /opt/keycloak/data/import/keycloak-kt2-realm.json
This will overwrite the config file at /config/keycloak-kt2-realm.json
.