Git Product home page Git Product logo

spotica's Introduction

First installation:

Install required packages. $ sudo apt-get update; sudo apt-get install mysql-server libmysqlclient-dev python-dev python-virtualenv (Set a mysql root password)

$ ./first_install.sh

Install the proper databases $ cd db $ ./install_db.sh (Will ask for the mysql root password configured above). $ cd ..

Sync the database $ source ./env/bin/activate $ cd web/scalica $ python manage.py makemigrations micro $ python manage.py migrate

After the first installation, from the project's directory

Run the server: $ source ./env/bin/activate $ cd web/scalica $ python manage.py runserver

Access the site at http://localhost:8000/micro

Spotica Specific

Celery

Celery is a distributed task runner and (with celery-beat) a task scheduler. It's used to async calculate the user and global sentiments. Celery requires redis.

To start celery: cd web/scalica celery -A scalica worker -B -l info --concurrency=4

This starts celery, connected to scalica, starting a worker as well (with concurrency 4), with loglevel set to INFO and starting celery-beat.

Setting up from bare server

Avoding pip errors and other dependencies: sudo apt-get install build-essential autoconf libtool pkg-config python-opengl python-imaging python-pyrex python-pyside.qtopengl idle-python2.7 qt4-dev-tools qt4-designer libqtgui4 libqtcore4 libqt4-xml libqt4-test libqt4-script libqt4-network libqt4-dbus python-qt4 python-qt4-gl libgle3 libmysqlclient-dev python-dev python-virtualenv libxml2 libxml2-dev libxslt1-dev nginx virtualenv venv . venv/bin/activate pip install -r requirements.txt cd /var/apps/spotica/web/scalica/scalica Copy settings.deploy.py to settings.py Configure env variables in bashrc (export DB_PASSWORD= .. export DB_HOST=) sudo ufw allow 'Nginx HTTP' cd /etc/nginx/sites-avaliable/ Edit nginx file cd /etc/nginx/sites-enabled/ sudo ln -s /etc/nginx/sites-available/spotica /etc/nginx/sites-enabled/spotica sudo systemctl reload nginx cd /var/apps/spotica/web/scalica python manage.py makemigrations micro python manage.py migrate python manage.py runserver - test that it all works mkdir log supervisord - starts both gunicorn and celery (can stop one or the other if needed)

spotica's People

Contributors

chelseavalentine avatar hannavas avatar brentdur avatar freialobo avatar lordlezehaf avatar

Watchers

James Cloos avatar  avatar  avatar  avatar  avatar

Forkers

freialobo

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.