Skip to content

Latest commit

 

History

History
97 lines (52 loc) · 2.91 KB

README.md

File metadata and controls

97 lines (52 loc) · 2.91 KB

Codacy Badge

Backend: Build Status Coverage Status Requirements Status sonarqube

Languages: Spanish English

Socializa

Package installation

1. Pacman
    	$ pacman -S git python postgresql postgis nodejs npm python-celery rabbitmq

2. Pip
    	$ pip install virtualenv

3. Npm
    	$ sudo npm install -g bower

Clone the repository

$ git clone htts://github.com/wadobo/socializa.git

Activate virtualenv

$ source bin/activate

Postgres configuration

1. Enable the service to run at system startup

    	$ sudo systemctl enable postgresql

    1.1	In order to get it working in archlinux
        $ sudo -u postgres initdb --locale $LANG -E UTF8 -D '/var/lib/postgres/data'

2. Start the service postgresql

    $ systemctl start postgresql

3. Create a postgis database with postgres user

    $ sudo -u postgres psql -c "create user socializa password 'socializa'"
    $ sudo -u postgres psql -c "create database socializa owner socializa"
    $ sudo -u postgres psql -d socializa -c "create extension postgis"
    $ sudo -u postgres psql -c "create database test_socializa owner socializa"
    $ sudo -u postgres psql -d test_socializa -c "create extension postgis"

Install python dependences

$ python install -r requirements.txt

Apply migrations

$ python manage.py migrate

Start and enable Rabbitmq service

$ sudo systemctl enable rabbitmq

$ sudo systemctl start rabbitmq

Run Celery

$ sudo celery -A socializa worker -l info -B -S Django

Add ip server to settings.py

ALLOWED_HOSTS = ['server ip']

Run Django server

$ python manage.py runserver 0.0.0.0:8000

Create administrator superuser Django

$ python manage.py createsuperuser

Compile frontend (/socializa/frontend/)

$ make dev

$ make web

Populate database

$ python manage.py loaddata player/fixtures/player-test.json

$ python manage.py loaddata event/fixtures/event.json

$ python manage.py loaddata clue/fixtures/clue.json

URL socializa-app

http://ip_server:8000/static/socializa/index.html