hapifhir / hapi-fhir-jpaserver-starter

Apache License 2.0
394 stars 1.05k forks source link

Docker example for custom content path #740

Open jgsuess opened 2 months ago

jgsuess commented 2 months ago

I need to override the default branding in a K8S deploy of HAPI in order to give some legal heads up about not storing real data on the server. So this is actually quite important.

I cannot get this to work, probably because I do not know where the mount for the custom directory needs to be placed in the container.

The application.yaml says about hapi.fhir.custom_content_path:

    ### Folder with custom content MUST be named custom. If omitted then default content applies
    #custom_content_path: ./custom

Hence, I have added an environment variable to signal that the facility is active, copied the custom directory from the starter project and mounted it as shown below. I have tried various mount locations, including absolute paths, and none of them seem to work.

Could you please give an example of how to make this call and maybe even add it to the documentation?

docker run --rm -p 8080:8080 -e hapi.fhir.default_encoding=xml -e hapi.fhir.custom_content_path=./custom hapiproject/hapi:latest -v $(pwd)/custom:/app/custom &

joofio commented 2 months ago

this should help. https://github.com/hl7-eu/vanilla-sandbox

joofio commented 1 month ago

did it work?

jgsuess commented 1 month ago

Yes, after some training I am writing up a summary on how to customize it so others will have an easier time. My goal is to automate a container build, but I am currently stuck with this issue :( https://github.com/GoogleContainerTools/kaniko/issues/1984