turn database initialization into a manage.py command
This commit is contained in:
parent
b3d1a8d04c
commit
bf65abae55
3 changed files with 48 additions and 26 deletions
29
README
29
README
|
|
@ -15,7 +15,8 @@ To run pan.do/ra you need to install and setup:
|
|||
additinal video packages
|
||||
|
||||
|
||||
* Installing required packages
|
||||
=== Installing required packages ===
|
||||
|
||||
1) add pandora ppa to get all packages in the required version
|
||||
|
||||
apt-get install software-properties-common
|
||||
|
|
@ -31,7 +32,8 @@ To run pan.do/ra you need to install and setup:
|
|||
poppler-utils mkvtoolnix gpac imagemagick \
|
||||
python-ox oxframe ffmpeg
|
||||
|
||||
* Prepare Environment
|
||||
=== Prepare Environment ===
|
||||
|
||||
1) add pandora user and set permissions
|
||||
adduser pandora --disabled-login --disabled-password
|
||||
|
||||
|
|
@ -50,7 +52,8 @@ Important: "use_your_own" is a password and you have to use the same value here
|
|||
rabbitmqctl set_permissions -p /pandora pandora ".*" ".*" ".*"
|
||||
|
||||
|
||||
* Install Pan.do/ra
|
||||
=== Install Pan.do/ra ===
|
||||
|
||||
1) Get code from bazzar
|
||||
cd /srv/
|
||||
bzr branch http://code.0x2620.org/pandora pandora
|
||||
|
|
@ -66,7 +69,7 @@ Important: "use_your_own" is a password and you have to use the same value here
|
|||
|
||||
2) create local_settings.py and config.jsonc
|
||||
|
||||
1) create file /srv/pandora/pandora/local_settings.py with the following content:
|
||||
2.1) create file /srv/pandora/pandora/local_settings.py with the following content:
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'NAME': 'pandora',
|
||||
|
|
@ -84,7 +87,7 @@ Important: "use_your_own" is a password and you have to use the same value here
|
|||
#with nginx X-Accel-Redirect set this to True
|
||||
XACCELREDIRECT = True
|
||||
|
||||
2) create config.jsonc
|
||||
2.2) create config.jsonc
|
||||
config.jsonc holds the configuration for your site.
|
||||
To start you can copy /srv/pandora/pandora/config.pandora.jsonc
|
||||
to /srv/pandora/pandora/config.jsonc but have a look at
|
||||
|
|
@ -94,15 +97,7 @@ Important: "use_your_own" is a password and you have to use the same value here
|
|||
3) initialize database
|
||||
su pandora
|
||||
cd /srv/pandora/pandora
|
||||
./manage.py syncdb --noinput
|
||||
./manage.py migrate item
|
||||
./manage.py migrate annotation
|
||||
./manage.py migrate
|
||||
./manage.py sqlfindindex
|
||||
./manage.py sync_itemsort
|
||||
./manage.py collectstatic -l --noinput
|
||||
./manage.py update_static
|
||||
./manage.py compile_pyc
|
||||
./manage.py init_db
|
||||
|
||||
4) install init scripts and start daemons
|
||||
cp /srv/pandora/etc/init/*.conf /etc/init/
|
||||
|
|
@ -136,7 +131,7 @@ b) apache2 (if you need it for other sites on the same server)
|
|||
|
||||
Now you can open pandora in your browser, the first user to sign up will become admin.
|
||||
|
||||
=== Updating ===
|
||||
== Updating ==
|
||||
To update a pandora installation get the latest version from bzr by running
|
||||
su pandora
|
||||
cd /srv/pandora
|
||||
|
|
@ -149,7 +144,7 @@ to update your database run:
|
|||
cd /srv/pandora
|
||||
./update.py db
|
||||
|
||||
=== Development ===
|
||||
== Development ==
|
||||
in one terminal:
|
||||
./manage.py runserver 2620
|
||||
|
||||
|
|
@ -158,5 +153,5 @@ to update your database run:
|
|||
|
||||
now you can access your local pandora instace at http://127.0.0.1:8000/
|
||||
|
||||
we use virtual machines for development, you can get a vm from our site
|
||||
we use virtual machines/lxc for development, you can get a vm from our site
|
||||
or use the script in vm/build.sh to create one.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue