From 7479b5fa28c5175100ffe4a8fa56615866c87f57 Mon Sep 17 00:00:00 2001 From: Jens Kristian Villadsen <46567685+jvitrifork@users.noreply.github.com> Date: Thu, 12 Nov 2020 10:31:24 +0100 Subject: [PATCH] Update README.md Added example for mounting configuration in a one-line style --- README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c5be768..13d8fe4 100644 --- a/README.md +++ b/README.md @@ -42,15 +42,23 @@ docker run -p 8080:8080 -e hapi.fhir.default_encoding=xml hapiproject/hapi:lates HAPI looks in the environment variables for properties in the [application.yaml](https://github.com/hapifhir/hapi-fhir-jpaserver-starter/blob/master/src/main/resources/application.yaml) file for defaults. -### Configuration via overridden application.yaml file +### Configuration via overridden application.yaml file and using Docker You can customize HAPI by telling HAPI to look for the configuration file in a different location, eg.: +``` +docker run -p 8090:8080 -v $(pwd)/yourLocalFolder:/configs -e "--spring.config.location=file:///configs/another.application.yaml" hapiproject/hapi:latest +``` +Here, the configuration file (*another.application.yaml*) is placed locally in the folder *yourLocalFolder*. + + + ``` docker run -p 8090:8080 -e "--spring.config.location=classpath:/another.application.yaml" hapiproject/hapi:latest ``` +Here, the configuration file (*another.application.yaml*) is part of the compiled set of resources. -### Example docker-compose.yml +### Example using docker-compose.yml for docker-compose ``` version: '3.7'