Hi all,
I am having issues installing a local instance of DHIS2 using the guide here https://developers.dhis2.org/2019/10/dhis2-and-docker/
I wanted to set it up using a sample database, so I used https://github.com/dhis2/dhis2-demo-db/tree/master/sierra-leone/2.32 which I renamed to init.sql
after downloading and unzipping.
After following instructions and running docker-compose up
using the image dhis2/core:2.33.4
the local session does start but there is no data:
Details of my configuration, running on MacOS
My file structure:
βββ config
β βββ init.sql
β βββ dhis2_home
β βββ dhis.conf
βββ docker-compose.yml
This is my docker-compose.yml
file:
version: '3'
services:
db:
image: mdillon/postgis:10-alpine
command: postgres -c max_locks_per_transaction=100
environment:
POSTGRES_USER: dhis
POSTGRES_DB: dhis2
POSTGRES_PASSWORD: dhis
volumes:
- ./config/init.sql:/docker-entrypoint-initdb.d/init.sql
web:
image: dhis2/core:2.33.4
volumes:
- ./config/dhis2_home/dhis.conf:/DHIS2_home/dhis.conf
environment:
- WAIT_FOR_DB_CONTAINER=db:5432 -t 0
ports:
- "8080:8080"
depends_on:
- db
This is my dhis.conf
file:
connection.dialect = org.hibernate.dialect.PostgreSQLDialect
connection.driver_class = org.postgresql.Driver
# "db" maps to service name defined in Docker Compose
# "dhis2" maps to POSTGRES_DB defined in Docker Compose
connection.url = jdbc:postgresql://db/dhis2
# maps to POSTGRES_USER environment variable in Docker Compose.
connection.username = dhis
# maps to POSTGRES_PASSWORD environment variable in Docker Compose.
connection.password = dhis
I also ran
docker run -v [path...]/dhis_2020/config/dhis2_home/dhis.conf dhis2/core:2.33.4
And Iβve tried this with other images (e.g. dhis2/core:2.33.0
) and other demo databases.
So it seems to me that part of the data is there (e.g. emails, messages and the regions), but the actual values for programs or any other data capture system are not there. Any help would be greatly appreciated.
Thanks in advance!