Code Monkey home page Code Monkey logo

isr's Introduction

Intelligent Show Room (ISR)

Deployment Guide:

Prerequisite:

Steps:

  1. Clone project code
$ git clone [email protected]:5peng/ucdip.git
  1. List item
$ cd ucdip/isr/
$ virtualenv venv
  1. Activate venv
$ source venv/bin/activate
  1. Setup database
$ mysql -uroot -p
mysql > CREATE SCHEMA `isr` DEFAULT CHARACTER SET utf8;
mysql > CREATE USER 'isr'@'localhost' IDENTIFIED BY 'welcome';
mysql> GRANT ALL PRIVILEGES ON isr.* TO 'isr'@'localhost';
mysql> FLUSH PRIVILEGES;
mysql> exit;
$ export DATABASE_URL=mysql://isr:1qaz2wsx@localhost/isr?charset=utf8
  1. Setup redis
export REDIS_URL=redis://:foobared@localhost:6379
  1. Run app
make run-all
  1. Test application
$ export MODE=debug
$ python manage.py runserver
$ curl http://127.0.0.1:5000/api/stores/2/sales

The application runs OK if an empty json array is returned.

Others:

  • Setup supervisor
$ cp deploy/gunicorn.conf.sample deploy/gunicorn.conf # make changes as you want
$ cp deploy/isrd.conf.sample deploy/isrd.conf # make changes as you want
$ cp deploy/celeryd.conf.sample deploy/celeryd.conf # make changes as you want

Then add isrd.conf and celeryd.conf to /etc/supervisor.conf

  • Config nginx to dispatch request to gunicorn

  • Grunt tasks

  1. compile all scss and combine js files in projects with source map, without source code compress.
$ grunt dev
  1. compile all js files only (combine all js, without compress)
$ grunt shampoo:dev
  1. compile all scss files with source map, without compress.
$ make sass:dev
  1. compile all scss with source map and combine js files, with js files modify watcher (will automatic update target js after file changes).
$ grunt watch
  1. combine all js files (only) without compress and watch js file changes.
$ grunt shampoo:watch
  • Load lookups
  1. Setup lookups for a new store
$ python manage.py lookup setup -s <store_id>
  1. Reload lookupvalues for a lookup
$ python manage.py lookup reload --id <lookup_id> -l <lookup_values_csv_location>

isr's People

Contributors

sungitly avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.