pan.do/ra is a free, open source media archive platform. https://pan.do/ra
Find a file
2012-03-20 19:23:15 +00:00
etc gunicorn 14 does not need settings to be passed 2012-03-09 13:35:00 +01:00
pandora escape quotes in config jsonc 2012-03-20 19:23:15 +00:00
scripts use imdbid in poster, fixes #410 2012-03-09 21:59:16 +01:00
static resurrect order button 2012-03-20 19:17:53 +00:00
vm bigger vm 2012-02-18 16:59:09 +05:30
.bzrignore init.js->pandora.js 2011-11-03 11:50:05 +01:00
README annotation cleanup 2011-12-26 20:00:30 +05:30
reload.sh add pid to upstart 2011-10-19 16:27:38 +02:00
requirements.txt fix permissions 2012-01-18 21:41:23 +05:30
update.sh order keywords. fixes #219 2012-01-31 05:54:18 +05:30

pan.do/ra - open media archive

== SETUP ==
To setup pan.do/ra, you need
python, bazaar, pip and virtualenv and several other python modules:

* Packages
    apt-get install python-software-properties
    add-apt-repository ppa:j/pandora
    apt-get update

    apt-get install bzr git subversion mercurial \
            python-setuptools python-pip python-virtualenv ipython \
            python-dev python-imaging python-numpy python-psycopg2 \
            python-geoip python-html5lib python-lxml \
            postgresql rabbitmq-server
    apt-get install oxframe oxtimeline 

* Pan.do/ra
Get code from bazzar
    bzr branch http://code.0x2620.org/pandora pandora
    cd pandora
    virtualenv .
    pip -E . install -r requirements.txt

    cd static
    bzr branch http://code.0x2620.org/oxjs

create settings_local.py and create site.jsonc
(use settings.py / 0xdb.jsonc / padma.jsonc as example)
create db
    
    ./manage.py syncdb

create / update static files
    
    ./manage.py update_static 
    ./manage.py compile_pyc


* Database
  We use postgresql but other databases might also work
  (make sure you have the python bindings installed).

  create a postgresql database and adjust settings in local_settings.py
  and run ./manage.py syncdb to populate the database.

    createdb  -T template0 --locale=C --encoding=UTF8 -O pandora pandora

  (setting locale to C is required to fix a bug in sort if set to UTF8)

* RabbitMQ
  For background tasks we use RabbitMQ, to install rabbitmq:
    sudo apt-get install rabbitmq-server

  and create permissions according to BROKER_* in local_settings.py i.e.:

    sudo rabbitmqctl add_user pandora box
    sudo rabbitmqctl add_vhost /pandora
    sudo rabbitmqctl set_permissions -p /pandora pandora ".*" ".*" ".*"

* H264
    to support h264 videos, install ffmpeg with x264 enabled,
    install qt-faststart from (ffmpeg/tools)
    to enable add "mp4" to video.formats in your config.jsonc

Running developer environment:
  in one terminal:
    ./manage.py runserver
  and in another one:
    ./manage.py celeryd -Q default,encoding -B

=== Updating ===
To update a pandora installation get the latest version from bzr by running
    ./update.sh
this will pull pandora/oxjs/python-ox and list possible upgrades to the db

to update your database tables, use
   ./manage.py sqldiff -a
to check if there are changes and
   ./manage.py sqldiff -a | ./manage.py dbshell
to apply them.

== DEPLOYMENT ==
* Install upstart scripts
check etc/init for upstart scripts, adjust path and user and put into /etc/init

To run pan.do/ra in production, we use nginx, using apache2 is also possible.

* nginx setup
    sudo apt-get install nginx 

  add this to local_settings.py:
    XACCELREDIRECT = True

  setup nginx according to etc/nginx/vhost.in

* apache2 setup
    apt-get install apache2-mpm-prefork libapache2-mod-xsendfile

  add this to local_settings.py:
    XSENDFILE = True

  setup apache according to etc/apache2/vhost.in