Open pmauduit opened 5 years ago
When this error message appears, during restart?
When this error message appears, during restart?
No, on a fresh docker-compose launch. To be honest, I pre-built the images on custom docker repositories and rewrote the docker-compose consequently so that it is more convenient for our customer to launch the compo without having to build the images in his infrastructure, but the docker composition used is pretty much the same as in this repository.
This is where the perl script is called from the dataverse container: https://github.com/IQSS/dataverse-docker/blob/master/dataversedock/setupIT.bash#L17
So the script comes from a zip file directly fetched during step2.sh, so it is not easily customizeable, but it seems that a patch (docker.patch) is actually meant to modify it during runtime:
https://github.com/IQSS/dataverse-docker/blob/master/dataversedock/setupIT.bash#L13
Ok, it's clear now what's happened. Just run docker.pach in the glassfish container as it will modify perl script to produce a proper configuration in domain.xml, and update Docker image.
I discarded the whole logic trying to connect as admin on postgres in my docker.patch, but it seems that I need now to fiddle with POSTGRES_PASSWORD in the dataverse container which is not taken into account (it still tries to use 'secret' as password).
I also noticed that the patch is written the invert way: https://github.com/IQSS/dataverse-docker/blob/master/dataversedock/docker.patch
I generated mine using the following:
diff install.orig install
where install.orig is the untouched version of the perl script
Can you probably install it by following the instruction, and after replace the image with database?
I pushed an updated version of the docker.patch file here: https://github.com/pmauduit/dataverse-docker/commit/cf513b7367773dcd9da0504bf8d05defa9c87127
I was able to launch my composition with no issue so far, but I'll retry a launch several time though (and I did not try yet in the current repository).
The dataverse container tries to create the database by connecting onto the postgresql server (from the postgresql container) at first run.
But is it necessary, as the env variables on the postgres container should already ensure that the database exist ?
By the way, digging in the entrypoint of the dataverse container, I could not find where the perl script (responsible of the psql command failing above) is supposed to be called exactly:
https://github.com/IQSS/dataverse-docker/blob/master/dataversedock/testdata/scripts/installer/install
Maybe we should consider that the db already exist and not try to create it from the dataverse container.