This repository group tools for developers to initialize and develop the openIMIS system.
git clone --recurse-submodules https://github.com/openimis/openimis-dev-tools.git
pip install -r requirements.txt
python python/setup-local-dev.py
Basic usage:
python setup-local-dev.pyWith a solution name:
python setup-local-dev.py CoreMISParameters:
SOLUTION(optional): Name of a solution from theopenimis/solutionsrepository. If provided, loads BE and FE configurations from the solutions repo. If not provided, uses localbackend/openimis.jsonandfrontend/openimis.jsonfiles.MODE(optional, second argument): Connection mode for Git operations. Options:ssh(default): Uses SSH URLs for cloning- Other modes use HTTPS with GitHub token authentication
What it does:
- Loads backend and frontend module configurations
- Clones or updates each module repository to the appropriate branch
- Generates
backend/openimis-dev.jsonandfrontend/openimis-dev.jsonwith local module paths - Backend modules are cloned to
backend-packages/, frontend modules tofrontend-packages/
Configuration:
Edit python/config.py to set:
GITHUB_TOKEN: GitHub personal access token for API accessUSER_NAME: Your GitHub usernameBRANCH: Default branch to checkout (e.g., 'develop', 'release/25.10')TIMER: Delay between API calls to avoid rate limits
Requirements:
- Python 3.x
- GitPython (
pip install GitPython) - PyGithub (
pip install PyGithub) - Valid GitHub token with repo access permissions
docker compose up --build -d
The main compose.yml file uses Docker Compose's extends feature to reference service definitions from compose-version.yml. This allows for modular configuration of different environments and services.
compose.yml: Main orchestration file that defines the services to run and their relationships.compose-version.yml: Contains detailed service configurations for backend, frontend, and database services in different modes (dev, prod, debug).
To run specific services, use profiles or service names. For example:
docker compose --profile migrations up migrations- Run only migrationsdocker compose up backend frontend- Run specific services
| Service Name | Type | Environment | Description |
|---|---|---|---|
migrations-dev |
Backend | Development | Runs database migrations and initial setup. Installs Python modules into shared venv. |
backend-dev |
Backend | Development | Django development server with auto-reload. Uses shared venv for modules. |
backend-debug |
Backend | Debug | Django server with debugpy for remote debugging. Uses shared venv for modules. |
backend-prod |
Backend | Production | Production-ready Django server with gunicorn. |
frontend-dev |
Frontend | Development | React development server with hot reload. |
frontend-prod |
Frontend | Production | Nginx serving built React application. |
db |
Database | N/A | PostgreSQL database server. |
db-mssql |
Database | N/A | Microsoft SQL Server database server. |
The backend containers (migrations, backend-dev, backend-debug) now use a shared virtual environment volume (venv) to store installed Python modules. This prevents the need to reinstall modules each time a container starts, improving startup times and avoiding import failures.
- The
venvvolume is automatically created and mounted at/venvin the containers. - Modules are installed into this shared environment, so once installed by one container (e.g., migrations), they are available to others.
- If you need to clear the installed modules, remove the
venvvolume:docker compose down -v(this will remove all volumes).
#person tocken
GITHUB_TOKEN=
#deprecated: list of module to take care of; now all module from openimis.json in the develop assembly are in
REPOS = []
#name of the branche to create/chec ...
RELEASE_NAME='release/23.04'
#to avoid too many request (Github block if not)
TIMER=5
check if there is an existing branch
create the release bracn from develop
get FE translation
create github, pip and npm release packages
create PR to merge dev to release
create PR to merge release to main
create docs
First you need to install or access the legacy openIMIS (at least the DB for the BE).
Make sure you have python installed in your computer and the python command is accessible (python bin folder is in PATH).