MO2.1 Install openIMIS using Docker
Video tutorial
This guide is valid for the installation of the new openIMIS version together with the REST API component.
0. Prerequisite
To install openIMIS using Docker, you first need first to install Docker on your computer/server. Please visit Get Docker website to download and install the version that matches your OS.
1. Download openIMIS Docker script
Download the files from openimis-dist_dkr onto your machine into a new folder.
2. First startup
Create the
.env
file from the.env.example
and configure the environment variables according to the comments in the file. By default, PostgreSQL database is used.then run those command in that order to make sure the coreMIS part is properly configured
docker compose up -d db #wait for the db to be initialised sleep 180 #load the .env file in your shell to have the access to the env variables source .env source .env.lightning # create the lightning database docker compose run -e PGPASSWORD=${POSTGRES_PASSWORD} --rm db createdb -h db -U ${POSTGRES_USER} ${POSTGRES_DB} set -e # init lighning docker compose run --rm web mix ecto.migrate docker compose run --rm web mix run imisSetupScripts/imisSetup.exs #start all modules docker compose up -d #load opensearch dashbaord docker compose run --rm -e MODE=DEV backend manage upload_opensearch_dashboards --host-domain https://demo.openimis.org --imis-password admin123
3. SSL certificate / https
there is a docker-compose that support let’s encrypt certificates
first export NEW_OPENIMIS_HOST ,
dry run
‘docker-compose run --rm --entrypoint " certbot certonly --webroot -w /var/www/certbot --staging --register-unsafely-without-email -d ${NEW_OPENIMIS_HOST} --rsa-key-size 2048 --agree-tos --force-renewal" certbot’
actual setup
docker-compose run --rm --entrypoint " certbot certonly --webroot -w /var/www/certbot --register-unsafely-without-email -d ${NEW_OPENIMIS_HOST} --rsa-key-size 2048 --agree-tos --force-renewal" certbot
4. Actions
From within openimis-dist_dkr/windows
directory:
To stop all docker containers:
docker-compose stop
To (re-)start all docker containers:
docker-compose start
To pull new images or images update `docker-compose pull`
Did you encounter a problem or do you have a suggestion?
Please contact our Service Desk
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. https://creativecommons.org/licenses/by-sa/4.0/