This Setup setup work with : openIMIS v 24.04
...
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".
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 providedexample.env
file.Ensure that you have the correct settings within your
.env
fileCode 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>
Frontend Setup (on work):
will ba shared soon:Clone the Frontend Repository
Code Block language powershell git clone https://github.com/openimis/openimis-fe_js.git
Switch to Your Frontend Project Directory
Code Block language powershell cd path/to/openimis-fe_js
Replace
path/to
with the actual path where you cloned the repository.Configure the Backend Port in package.json: Open the
package.json
file in your preferred text editor and ensure the proxy configuration points to your backend port. It should look something like this:Code Block language json "proxy": "http://localhost:<your backend port number>"
Replace
<your backend port number>
with the actual port number your backend is running on.Load Configuration
Code Block language powershell yarn load-config
This step loads necessary configurations for the project.
Build the Project
Code Block language powershell yarn build
This command builds the project for production.
Install
serve
GloballyCode Block language powershell yarn global add serve
This command installs
serve
, a simple static file server, globally on your system.Start the Project
Code Block language powershell yarn start
This command starts the development server. You can now access the frontend in your browser at
http://localhost:3000
(or another port if specified).