-
Notifications
You must be signed in to change notification settings - Fork 9
Docker Services
In a Docker environment, three Docker containers would be run for a fully functional installation of ToF:
- OAuth2 authentication provider (such as keycloak)
- FHIR Server (such as HAPI)
- ToF (build the image using the Dockerfile in the root of the repository)
An example of running KeyCloak in a docker container can be found in the KeyCloak Configuration page.
The hapi-fhir-jpaserver-starter project has a Dockerfile in it that you can use to build an image for HAPI. The Dockerfile in that project currently assumes that the build server has pre-compiled the application.
Once those dependencies are running in Docker, you can build a docker image for ToF by running docker build --tag tof:latest .
from the root directory of the repository and run it using docker run tof:latest
. Note, however, that you would need to change the configuration for ToF in the /tof/apps/server/config
directory to point to the fhir server and authentication provider being run as separate docker containers. That can be done using a docker config
.
Using docker config
requires the docker environment to be a swarm. You can setup your docker installation as a swarm using docker swarm init
.
Assuming you have docker running in a swarm, you can create a config for tof by running docker config create tof-config --file local.json
. In this case, local.json
is the custom configurations that should overwrite default.json
. After the config has been created in docker, you can bind/mount the config inside the tof container. See Use bind mounts for more information on how to do that.