Backend Installation Guide

This guide provides step-by-step instructions for setting up the openIMIS Backend (Python) on Windows. Follow these steps to clone the repository, configure the environment, install dependencies, migrate the database, and start the server.

Prerequisites

  • Git installed.

  • Python installed (preferably Python 3.x).

  • Command Prompt (cmd.exe) available.

Step-by-Step Instructions

1. Clone openIMIS Backend Project

Clone the openIMIS Backend repository from GitHub.

git clone https://github.com/openimis/openimis-be_py.git

2. Create .env File

Navigate into the cloned repository directory and create a .env file based on the provided example.env file. Replace placeholders <your database user name>, <your database user password>, and <your database name> with your actual database credentials.

3. Set up Virtual Environment and Install Dependencies

Open Command Prompt and navigate to the cloned repository (openimis-be_py).

Create a Virtual Environment

python -m venv venv

Activate the Virtual Environment

venv\Scripts\activate

Install Requirements

Install required Python packages using requirements.txt.

Install External Dependencies

Install additional dependencies required by openIMIS.
Copy the file “openimis.json“ to the folder “Script“

4. Migrate the Database

Navigate to the openIMIS directory within the repository.

Run migrations to set up the database schema.

5. Start the Server

Run the development server to start the openIMIS Backend.

Default Port (8000)

Specific Port

To run the server on a specific port (e.g., 8080):

Summary

You have now successfully set up and started the openIMIS Backend on your local machine. Ensure that the server is running and accessible as per your requirements.

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/