Hello to all,
I have a problem deploying dhis2 version 2.38 and 2.39 with Docker compose.
I have already done several deployments of Docker container with DHIS2 2.33 and 2.36 without difficulty. However with the last 2 versions of DHIS2 (2.38 and 2.39), I have an error “Directory /DHIS2_home is not writeable”. I tested several solution proposal but the problem (here is the screenshot).
I wanted to add some context to what Andreas said for you or others. If you fixed your problem and are not interested in the details you can skip what follows
DHIS2 lets you configure the home directory for example via environment variable DHIS2_HOME or system property dhis2.home passed to the process running DHIS2 (like Tomcat). If you do not pass any explicit configuration it will default to /opt/dhis2.
The DHIS2 Docker image did set the environment variable DHIS2_HOME to /DHIS2_home in the past. This is why you had to mount your volume, dhis.conf, … into /DHIS2_home. We made some improvements to the Docker images (smaller, caching, multi-arch with arm64 support, …). We did not see any reason to choose /DHIS2_home. We wanted to align the Docker image with DHIS2. This is why newer images will simply default to /opt/dhis2 as does DHIS2 itself. See docs https://github.com/dhis2/dhis2-core#dhis2_home
Thank you all for your answers and solutions.
In addition to changing the environment variable directory to /opt/dhis2, I also linked the dhis.conf file directly to the /opt/dhis2 directory of the container.