fix vm build script/nginx example config

This commit is contained in:
j 2013-02-02 19:53:44 +05:30
parent ca50e1dc54
commit 2cf3d3e7cb
2 changed files with 9 additions and 6 deletions

View file

@ -41,7 +41,7 @@ server {
proxy_read_timeout 90; #should be in sync with gunicorn timeout
proxy_connect_timeout 90; #should be in sync with gunicorn timeout
if (!-f $request_filename) {
proxy_pass http:/127.0.0.1:2620;
proxy_pass http://127.0.0.1:2620;
break;
}
client_max_body_size 32m;

View file

@ -40,16 +40,19 @@ TEMPLATE_DEBUG = DEBUG
JSON_DEBUG = False
EOF
MANAGE="sudo -H -u pandora python manage.py"
cd /srv/pandora/pandora
sudo -u pandora python manage.py syncdb --noinput
sudo -u pandora python manage.py sqlfindindex | sudo -u pandora python manage.py dbshell
echo "UPDATE django_site SET domain = '$HOST.local', name = '$HOST.local' WHERE 1=1;" | sudo -u pandora python manage.py dbshell
$MANAGE syncdb --noinput
$MANAGE migrate
echo "DB_GIN_TRGM = True" >> /srv/pandora/pandora/local_settings.py
$MANAGE sqlfindindex
echo "UPDATE django_site SET domain = '$HOST.local', name = '$HOST.local' WHERE 1=1;" | $MANAGE dbshell
mkdir /srv/pandora/data
chown -R pandora:pandora /srv/pandora
sudo -u pandora python manage.py update_static
sudo -u pandora python manage.py collectstatic -l --noinput
$MANAGE update_static
$MANAGE collectstatic -l --noinput
cp /srv/pandora/etc/init/* /etc/init/