update README, move scripts to toplevel
61
README
|
@ -1,14 +1,16 @@
|
|||
pan.do/ra - open media archive
|
||||
|
||||
== DEVELOPMENT ==
|
||||
To setup a development instance of pan.do/ra,
|
||||
you need python, bazaar, pip and virtualenv and several other python modules:
|
||||
== SETUP ==
|
||||
To setup pan.do/ra, you need
|
||||
python, bazaar, pip and virtualenv and several other python modules:
|
||||
|
||||
* Packages
|
||||
apt-get install bzr git subversion mercurial \
|
||||
python-setuptools python-pip python-virtualenv ipython \
|
||||
python-dev python-imaging python-numpy python-psycopg2
|
||||
|
||||
* Pan.do/ra
|
||||
Get code from bazzar
|
||||
bzr branch http://code.0x2620.org/pandora pandora
|
||||
cd pandora
|
||||
virtualenv .
|
||||
|
@ -17,6 +19,18 @@ you need python, bazaar, pip and virtualenv and several other python modules:
|
|||
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
|
||||
|
||||
|
||||
* Additional pandora tools:
|
||||
You need current versions of oxframe, oxtimeline installed.
|
||||
For Ubuntu we provide these packages in a ppa:
|
||||
|
@ -30,11 +44,12 @@ you need python, bazaar, pip and virtualenv and several other python modules:
|
|||
(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
|
||||
you might want to load example configurations from fixutes.
|
||||
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
|
||||
|
@ -48,7 +63,7 @@ you need python, bazaar, pip and virtualenv and several other python modules:
|
|||
* H264
|
||||
to support h264 videos, install ffmpeg with x264 enabled,
|
||||
install qt-faststart from (ffmpeg/tools)
|
||||
set VIDEO_H264 = True in local_settings.py
|
||||
to enable add "mp4" to video.formats in your config.jsonc
|
||||
|
||||
Running developer environment:
|
||||
in one terminal:
|
||||
|
@ -56,24 +71,36 @@ Running developer environment:
|
|||
and in another one:
|
||||
./manage.py celeryd -Q default,encoding -B
|
||||
|
||||
Updating database:
|
||||
right now database updates are not managed, each time you update to current bzr
|
||||
you might have to update db tables too.
|
||||
Use
|
||||
./manage.py sqldiff appname
|
||||
to check if changes exist and
|
||||
./manage.py sqldiff appname | ./manage.py dbshell
|
||||
to apply them.
|
||||
This has to be done for all installed apps
|
||||
=== 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
|
||||
sudo apt-get install apache2-mpm-prefork
|
||||
sudo apt-get install libapache2-mod-xsendfile
|
||||
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
|
||||
|
||||
|
|
|
@ -1,59 +0,0 @@
|
|||
[
|
||||
{
|
||||
"pk": 1,
|
||||
"model": "backend.reviewwhitelist",
|
||||
"fields": {
|
||||
"url": "://filmcritic.com",
|
||||
"name": "Filmcritic"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 2,
|
||||
"model": "backend.reviewwhitelist",
|
||||
"fields": {
|
||||
"url": "villagevoice.com",
|
||||
"name": "Village Voice"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 3,
|
||||
"model": "backend.reviewwhitelist",
|
||||
"fields": {
|
||||
"url": "salon.com",
|
||||
"name": "Salon.com"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 4,
|
||||
"model": "backend.reviewwhitelist",
|
||||
"fields": {
|
||||
"url": "rottentomatoes.com",
|
||||
"name": "Rotten Tomatoes"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 5,
|
||||
"model": "backend.reviewwhitelist",
|
||||
"fields": {
|
||||
"url": "nytimes.com",
|
||||
"name": "New York Times"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 6,
|
||||
"model": "backend.reviewwhitelist",
|
||||
"fields": {
|
||||
"url": "metacritic.com",
|
||||
"name": "Metacritic"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pk": 7,
|
||||
"model": "backend.reviewwhitelist",
|
||||
"fields": {
|
||||
"url": "sensesofcinema.com",
|
||||
"name": "Senses of Cinema"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
@ -182,11 +182,12 @@ VIDEO_PREFIX=''
|
|||
#VIDEO_PREFIX='videoPART.example.com'
|
||||
#SESSION_COOKIE_DOMAIN=*.example.com"
|
||||
|
||||
SCRIPT_ROOT = normpath(join(PROJECT_ROOT, '..', 'scripts'))
|
||||
#copy scripts and adjust to customize
|
||||
ITEM_POSTER = join('scripts', 'oxdb_poster')
|
||||
#ITEM_POSTER = join('scripts', 'padma_poster')
|
||||
ITEM_ICON = join('scripts', 'item_icon')
|
||||
LIST_ICON = join('scripts', 'list_icon')
|
||||
ITEM_POSTER = join(SCRIPT_ROOT, 'oxdb_poster')
|
||||
#ITEM_POSTER = join(SCRIPT_ROOT, 'padma_poster')
|
||||
ITEM_ICON = join(SCRIPT_ROOT, 'item_icon')
|
||||
LIST_ICON = join(SCRIPT_ROOT, 'list_icon')
|
||||
|
||||
|
||||
#you can ignore things below this line
|
||||
|
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
|
@ -4,7 +4,7 @@
|
|||
from __future__ import division
|
||||
import os
|
||||
|
||||
root_dir = os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')))
|
||||
root_dir = os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
|
||||
|
||||
#using virtualenv's activate_this.py to reorder sys.path
|
||||
activate_this = os.path.join(root_dir, 'bin', 'activate_this.py')
|
|
@ -4,7 +4,7 @@
|
|||
from __future__ import division
|
||||
import os
|
||||
|
||||
root_dir = os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')))
|
||||
root_dir = os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
|
||||
|
||||
#using virtualenv's activate_this.py to reorder sys.path
|
||||
activate_this = os.path.join(root_dir, 'bin', 'activate_this.py')
|
|
@ -4,7 +4,7 @@
|
|||
from __future__ import division
|
||||
import os
|
||||
|
||||
root_dir = os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')))
|
||||
root_dir = os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
|
||||
|
||||
#using virtualenv's activate_this.py to reorder sys.path
|
||||
activate_this = os.path.join(root_dir, 'bin', 'activate_this.py')
|
|
@ -4,7 +4,7 @@
|
|||
from __future__ import division
|
||||
import os
|
||||
|
||||
root_dir = os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')))
|
||||
root_dir = os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
|
||||
|
||||
#using virtualenv's activate_this.py to reorder sys.path
|
||||
activate_this = os.path.join(root_dir, 'bin', 'activate_this.py')
|