These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Here is what you need to install the software.
- Git
To fetch the source code you'll require git to be installed on your machine.
$ git clone https://gitlab.com/arnoldnderitu1/olamerp-tenant.git
- Python
Olam ERP requires Python 3.6 or later to run. Use your package manager to download and install python 3 on your machine if you don't have it already.
If Python 3 is already installed, make sure that the version is 3.6 or above
$ python3 --version
Verify that pip is installed for this version.
$ pip3 --version
- Dependencies
Project dependencies are listed in the requirements.txt
file located at the root of the olamerp-tenant
directory
It is preferable to not to mix python modules packages within your system. You can use virtualenv to create isolated Python environments
Navigate to the path of the olamerp-tenant
root directory and run pip on the requirements file:
$ cd /olamerp-tenant
$ python3 -m venv venv
$ . venv/bin/activate
$ pip install -r requirements.txt
- Redis
Install the latest stable version of Redis from the redislabs/redis
package repository. Add the repository to the apt index, update it and install:
$ sudo add-apt-repository ppa:redislabs/redis
$ sudo apt-get update
$ sudo apt-get install redis
Start the Redis Server with:
$ redis-server
Run an RQ Worker on seperate terminal window
$ cd /olamerp-tenant
$ python3 -m venv venv
$ . venv/bin/activate
(venv) $ rq worker olam-tenant
- Initialize Database
For demo, initialize and seed the DB with dummy data:
$ flask db upgrade
$ flask dummy
Once all dependencies are set up, to launch the app in debug mode:
$ export FLASK_DEBUG=1
$ flask run
Navigate to http://127.0.0.1:5000/ on your local browser
To log in:
Email:arnold@tsh.com
Password: demo