Creating a pre-initialized MySQL Docker database

It appears that the Refapp Distro Image gets built on every change and published to nightly. That is very cool. I’d like to create a dependent job, which starts a server using that image and a fresh MySQL database, waits for it to go all the way through initialization, and then saves the database container as a new image. We can then use this pre-initialized image for e.g. running E2E tests, making them run much faster.

Where does the job that publishes that Refapp Distro Image live? Is that something that one of our Bamboo jobs does?

@ibacher @mseaton @jayasanka


Thanks for initiating this @bistenes! Hopefully, this will help solve the dockerizing issue on RefApp 3.x E2E tests and make developers’ lives easier.

1 Like

The image is published in this job on Bamboo.

1 Like

Hi all! We are trying to run all the E2E tests using this (openmrs-distro-referenceapplication/docker-compose-distro.yml at 3.x · openmrs/openmrs-distro-referenceapplication · GitHub) docker-compose file. When running that, it automatically generates some of the user details and location details. But in there, some of the metadata such as concepts, provider details are missing.

What we need is to generate a database similar to the database in openmrs-spa server. So, is there a way to generate those data automatically, or is there any database container we could use?

cc: @jayasanka @bistenes @ibacher

1 Like

@piumal1999 Yes, this is something that I thought would come up. What we need is to catalogue the data that are missing and we can easily add it via the Initializer module. One of the reasons for migrating off of the openmrs-spa server is precisely because replicating that database in a different context is very hard.

So, my question to you is: what concepts do we need? What provider details do we need?


I’ll check those and let you know as soon as possible. Thank you

Hi @ibacher, These are the missing entities that we need for the E2E tests at the moment:

  1. Any provider (Previously we used this. In the DB built with docker image, there were no provider entities)
  2. Viral Load concept (Similar to this)

Hello @ibacher, would you be able to add the above 2 entities to the database? Thanks in advance

@piumal1999 Sorry for the delay in responding to this. Yes, this is something that will be added as well as some sample patient data.

1 Like

Thank you @ibacher

I have a small doubt. In docker database configurations, I can’t see a pre-defined admin UUID. Does it mean that the admin uuid generates randomly? or is it defined somewhere else?

See here:

1 Like