Stream: hapi
Topic: datasource
Alonso Alberto Carvajal (Mar 04 2021 at 14:37):
Hello everyone, I'm trying to use an external PostgreSQL database with HAPI-FHIR service. I've been doing everything this https://github.com/hapifhir/hapi-fhir-jpaserver-starter manual mentioned without success. Apparently the docker service doesn't read the application.yaml configuration. Someone has been the same?
Richard Stanley (Mar 04 2021 at 14:49):
Hi @Alonso Alberto Carvajal You can use environment vars to get it to work, no need to use application.yml. Here's an example using PG which you can just change it to use an external database if you wish. See the last comment in this gist. https://gist.github.com/citizenrich/ef644ea195106a771717e8c234e525b3#gistcomment-3496813
Alonso Alberto Carvajal (Mar 04 2021 at 15:10):
Thanks @Richard Stanley , your recommendation works perfectly! I just wonder why it does not work with the recommendations that are in https://github.com/hapifhir/hapi-fhir-jpaserver-starter :thinking:
Jens Villadsen (Mar 04 2021 at 15:23):
@Alonso Alberto Carvajal you need to remember to mount your configuration inside the docker image. An example of this is here: https://github.com/hapifhir/hapi-fhir-jpaserver-starter#configuration-via-overridden-applicationyaml-file-and-using-docker
Alonso Alberto Carvajal (Mar 04 2021 at 19:14):
Jens Villadsen said:
Alonso Alberto Carvajal you need to remember to mount your configuration inside the docker image. An example of this is here: https://github.com/hapifhir/hapi-fhir-jpaserver-starter#configuration-via-overridden-applicationyaml-file-and-using-docker
@Jens Villadsen Thanks for this information. I've been trying to integrate that solution for quite some time without success. Maybe there is something I am doing wrong, however I will keep trying. At the moment @Richard Stanley 's solution meets my need.
Last updated: Apr 12 2022 at 19:14 UTC