...
Install Docker Desktop
Because the legacy is working only on Windows, the following refers to a docker on windows 10 or windows server 2016 (or newer)
In order to install the modular openIMIS using Docker, you first need to install Docker Desktop. Please download and install the platform from the Docker Desktop website.
then make sure to use windows container (Docker image operating system "windows" cannot be used on this platform )
Download openIMIS Docker script
Download and unzip the release from Github openimis-dist_dkr repository into a new folder.
First startup
The first startup is special since it will create the necessary docker images and containers to run openIMIS. To build necessary, docker images, docker-compose relies on local docker files. In order to build these images, you need to clone, next to openimis-dist_dkr/
the following Github repository:
openimis-db_dkr (not for production)
Or clone the 5 directory with git
...
Video tutorial
Widget Connector | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Excerpt |
---|
This guide is valid for the installation of the new openIMIS version together with the REST API component. 0. PrerequisiteTo install openIMIS using Docker, you first need first to install Docker on your computer/server. Please visit https://docs.docker.com/get-docker/ website to download and install the version that matches your OS. 1. Download openIMIS Docker scriptClone the https://github.com/openimis/openimis- |
...
dist_dkr on your machine into a new folder. |
...
From within openimis-dist_dkr/windows
directory:
create a
.env
file, providing the following variables:
Code Block | ||
---|---|---|
| ||
DB_SQL_SCRIPT=<URL pointing to the SQL script>
ACCEPT_EULA=<must put Y but it means you accept Microsoft EULA for the MSSQL database container>
DB_HOST=database
DB_PORT=1433
DB_NAME=<your database name, imis if you use the demo docker 'db' service>
DB_USER=<your database user, sa if you use the demo docker 'db' service >
DB_PASSWORD=<your database password, generate one if you use the demo docker 'db' service>
NEW_OPENIMIS_HOST=<(sub)domain under which the (new) openIMIS will be served (e.g. openimis.domaine) >
LEGACY_OPENIMIS_HOST=frontend |
...
2. First startup
|
...
|
...
|
...
|
...
...
|
...
|
...
choose the SQL script to create/restore the database in DB_SQL_SCRIPT
. Reference models are provided in the database installation tutorial. Example:
Empty database:
https://raw.githubusercontent.com/openimis/database_ms_sqlserver/v1.4.2/Empty%20databases/openIMIS_ONLINE.sql
Demo database:
https://raw.githubusercontent.com/openimis/database_ms_sqlserver/v1.4.2/Demo%20database/openIMIS_demo_ONLINE.sql
|
...
build and start the database docker image: docker-compose up db
...
create the openIMIS database into the container:
docker container ls
and spot the line (CONTAINER ID) withopenimis-db
IMAGE namedocker exec <CONTAINER ID> /create_database.bat
...
create the database user
docker exec <CONTAINER ID> /create_user_db.bat
...
build and start the gateway, frontend and backend docker image: docker-compose up
(note: at each start, openIMIS will apply the necessary database migrations to update the database scheme)
...
If connecting to brand new database, register your openIMIS superuser:
list running containers and spot the backend:
docker container ls
(the gateway should be namedopenimis-backend
)connect to the gateway:
docker exec -it <CONTAINER ID> /bin/bash
(bash and not sh this time)you should be in /openimis-be/openIMIS directory, if not, just
cd /openimis-be/openIMIS
)register your openIMIS superuser:
python manage.py createsuperuser
(and follow instructions)
...
3. SSL certificate / httpsthere is a docker-compose that support let’s encrypt certificates first export NEW_OPENIMIS_HOST , dry rundocker-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 setupdocker-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. ActionsFrom within
|
...
|
Note:
...
Updating the certificates of the front end is required for production usage openimis-gateway_dkr/certs/
...
Using docker database is not advised for production
...
This docker-compose don’t use REDIS and Celery, if multi-backend is required please check the docker-compose in the openimis-dist_dkr
directory or create a ticket.
...
|