Start with a fresh folder and copy a hapi.properties into it. It will be mounted into the container.
Carefully make sure your hapi.properties looks like this:
# add postgres
datasource.driver=org.postgresql.Driver
datasource.url=jdbc:postgresql://db:5432/hapi
hibernate.dialect=org.hibernate.dialect.PostgreSQL95Dialect
datasource.username=admin
datasource.password=admin
# comment out derby
# datasource.driver=org.h2.Driver
# datasource.url=jdbc:h2:file:./target/database/h2
# datasource.username=
# datasource.password=
...
###################################################
# Database Settings
###################################################
# comment this out
# hibernate.dialect=org.hibernate.dialect.H2Dialect
Add the docker-compose below, and docker-compose up
. Visit: http://localhost:8080/hapi-fhir-jpaserver/
To troubleshoot:
- Database stuff: Connect to the database at localhost:5432 using your tool of choice with user
admin
, passadmin
, and to dbhapi
. Obviously, don't use the same settings in production. - HAPI: Run
docker ps
to get your container id. Then run commands you need to in the running container like:docker exec <containerid> /bin/bash -c 'cat /usr/local/tomcat/conf/hapi.properties
Awesome. Thank you!