Skip to content

Latest commit

 

History

History
108 lines (78 loc) · 2.29 KB

basic.md

File metadata and controls

108 lines (78 loc) · 2.29 KB

Generic

Dependencies required to run Orga Server

  • Python 2
  • Postgres
sudo apt-get update
sudo apt-get install postgresql postgresql-contrib
  • NodeJS if nvm(Node Version Manager) is not installed: using cURL:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash

or Wget:

wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash

run nvm after exporting NVM_DIR:

. "$NVM_DIR/nvm.sh"

Node installation, v6.9.1 is LTS, though you can install other versions as well:

nvm install 6.9.1

Steps

Make sure you have the dependencies mentioned above installed before proceeding further.

Run the commands mentioned below with the terminal active in the project's root directory.

  • Step 1 - Install python requirements.
pip install -r requirements.txt
  • Step 2 - Create the database. For that we first open the psql shell.
sudo -u postgres psql
  • When inside psql, create a user for open-event and then using the user create the database.
CREATE USER john WITH PASSWORD 'start';
CREATE DATABASE oevent WITH OWNER john;
  • Once database is created, exit the psql shell with \q followed by ENTER.

  • Step 3 - Create application environment variables.

cp .env.example .env
  • Step 4 - Start the postgres service.
sudo service postgresql restart
  • Step 5 - Create the tables. For that we will use create_db.py.
python create_db.py
# enter email and password
python manage.py db stamp head
  • Step 6 - Start the application along with the needed services. The & at the end of the commands below make them run in background so that they don't hold the terminal.
# download and run redis
wget http://download.redis.io/releases/redis-3.2.1.tar.gz
tar xzf redis-3.2.1.tar.gz
rm redis-3.2.1.tar.gz
cd redis-3.2.1
make

# To run redis
redis-3.2.1/src/redis-server &

# run worker
export INTEGRATE_SOCKETIO=false
# socketio has problems with celery "blocking" tasks
# also socketio is not used in a celery task so no problem to turn it off
celery worker -A app.celery &
unset INTEGRATE_SOCKETIO

# run app
python manage.py runserver
  • Step 7 - Rejoice. Go to localhost:5000 in your web browser to see the application live.