Skip to content

BLSQ/ops-dhis2-images

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Repository to build

dhis2 images : https://hub.docker.com/r/blsq/dhis2/tags

Using

ENV variables

env variable default value description
DHIS_BASE_URL
DATABASE_HOST
DATABASE_NAME
DATABASE_PORT 5432
DATABASE_USER
DATABASE_PASSWORD
DATABASE_OPTIONS sslmode=require depending on how is pg configure you might want to override that (eg localhosting)
ENCRYPTION_PASSWORD
FILESTORE_PROVIDER aws-s3 other possible value filesystem
FILESTORE_BUCKET set to files if not S3\n if s3 note that older version don't support eu-central-1
FILESTORE_LOCATION set to files if not S3
FILESTORE_IDENTITY
FILESTORE_SECRET
DHIS_AUDIT_LOGGER on
DHIS_AUDIT_DB on
DHIS_AUDIT_MATRIX_METADATA CREATE;UPDATE;DELETE;READ
DHIS_AUDIT_MATRIX_TRACKER CREATE;UPDATE;DELETE;READ
DHIS_AUDIT_MATRIX_AGGREGATE CREATE;UPDATE;DELETE;READ
DHIS_GOOGLE_AUTH cat dhis-google-auth.json | base64 -w 0
DHIS_MONITORING_API true
DHIS_MONITORING_JVM on
DHIS_MONITORING_DBPOOL on
DHIS_MONITORING_HIBERNATE off
DHIS_MONITORING_UPTIME on
DHIS_MONITORING_CPU on
CACHE_EXPIRATION
DEFAULT_LOG_LEVEL
DHIS_LOG_LEVEL
SPRING_LOG_LEVEL
HAZELCAST_LOG_LEVEL

Volumes

for local hosting you can override ./root/files

Development

Testing locally

If it's a new major version check the documentation for the changes in dhis.conf then test locally

Let's say we want to release a 2.33.8 version

./script/build 2.33.8

launch the docker compose

cd test
DHIS2_FULL_VERSION=2.33.8 docker-compose up

(note data isn't persisted on purpose)

then check

http://localhost:8080/

login with admin district

note for testing "FILESTORE_PROVIDER" related properties you can just install taskr in the dhis2 apps.

Releasing an image via github workflow

Preferred method (better network connectivity compared to your home network)

https://github.com/BLSQ/ops-dhis2-images/actions/workflows/publish.yml

Make sure you are on the correct branch for the version you want to release:

Branch DHIS2 Versions
237-and-before 2.37 and below
main 2.38 → 2.40
241 2.41

Example:

  • if you need to release DHIS2 2.39 version, switch to the main branch before triggering the workflow.
  • if you need to release DHIS2 2.36 version, switch to the 237-and-before branch before triggering the workflow.

Releasing an image locally

Let's say we want to release a 2.33.8 version

./script/build 2.33.8

if not done yet, you need to login

docker login

then publish on dockerhub

./script/publish 2.33.8

test that image in staging or test environment

Implementation details

  • Different approach compared to the official images
    • don't rebuild the war files but use the official released war
    • allow config via env variables for most options (thanks to dockerize)
    • don't force volumes by default
    • log to stdout and not files
    • use an embbeded tomcat war runner (no tomcat manager)
  • Compared to a previous approach, moved the download of the war "outside" the dockerfile:
    • this increase the docker build context but
    • allow faster build locally if you previously downloaded the war file (eg to test changes in dockerfile or templates).

About

Dhis2 images

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •