Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Database Setup:

    • Clone openIMIS Database Project:

      Code Block
      git clone https://github.com/openimis/openimis-db_dkr.git
    • In SQL Server, create a new Database, e.g., "open-imis-db".

    • Create a database user with read, write, and adminddl access only to our database.

    • Log in to the database as the newly added user.

    • Navigate to the cloned folder 'database_ms_sqlserver' within the openIMIS Database Project.

    • Open a Linux shell and execute the script file "concatenate_files.sh" located in the aforementioned folder.

    • Run the generated sql script in the output folder, e.g., "fullDemoDatabase.sql".

  2. Backend Setup:

    • Clone openIMIS Backend Project:

      Code Block
      git clone https://github.com/openimis/openimis-be_py.git
    • Create your .env file based on the provided example.env file.

    • Ensure that you have the correct settings within your .env file

      Code Block
      MSSQL_DB_USER= <your database user name>
      MSSQL_DB_PASSWORD = <your database user password>
      MSSQL_DB_NAME = <your database name>
      
      #Ensure that SCHEDULER_AUTOSTART=True is uncommented
      #SCHEDULER_AUTOSTART=True 
      
      DB_DEFAULT=mssql
    • Install openIMIS (external) dependencies:

      • Open the command prompt.

      • Navigate to the cloned repository "..\openimis-be_py".

      • virtual environment:

        • Create your virtual environment:

          Code Block
          python -m virtualenv venv
        • Activate your virtual environment

          Code Block
          venv\Scripts\activate
      • install requirements

        Code Block
        pip install -r requirements.txt
        Code Block
        python script\modules-requirements.py openimis.json > modules-requirements.txt
        Code Block
        pip install -r modules-requirements.txt
        Code Block
        pip install -U 'Twisted[tls,http2]'

      Migrate the Database with the Backend:

      • Open the command prompt and navigate to "openimis-be_py/openIMIS".

      • Run

        Code Block
        python manage.py migrate
      • Start the server by running:

        • run server on port 8000

          Code Block
          python manage.py runserver
        • or run server with specified port

          Code Block
          python manage.py runserver <your port> 
  3. Frontend Setup (on work):
    will ba shared soon