Skip to content

kinuthiaduncan/graph-data-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SETTING UP

Prerequisites
  1. Install prerequisites

    sudo apt-get update $ sudo apt-get install python-pip python-dev build-essential libpq-dev postgresql postgresql-contrib virtualenv virtualenvwrapper $ export LC_ALL="en_US.UTF-8" $ pip install --upgrade pip $ pip install --upgrade virtualenv
    
PostgreSQL
  1. Access Postgres Prompt

    sudo -u postgres psql
    
  2. Create the database

    CREATE DATABASE cdr_analysis;
  3. Assign all rights to user

    GRANT ALL PRIVILEGES ON DATABASE cdr_analysis TO postgres;
  4. Exit postgres

    exit
    
Django
  1. Create a python 3 virtual environment

    virtualenv -p python3 venv
    
  2. Activate the virtual environment

    source venv/bin/activate
    
  3. Install the project's dependencies

    pip install -r requirements.txt
    
  4. Run the database migrations

    python manage.py migrate
    
  5. Copy the default CDR schema

    python manage.py loaddata cdr_schema.json
    
  6. Copy the default BTS schema

    python manage.py loaddata bts_schema.json
    
  7. Create a superuser

    python manage.py createsuperuser
    

Running the project

Development
  1. Install front-end dependencies

    npm install
    
  2. Run the code watcher

    npm run watch
    
  3. Start the django development server

    python manage.py runserver
    
Production

Follow the guide at DEPLOY DJANGO APP: NGINX, GUNICORN, POSTGRESQL & SUPERVISOR

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •