fix vm build script/nginx example config
This commit is contained in:
parent
ca50e1dc54
commit
2cf3d3e7cb
2 changed files with 9 additions and 6 deletions
|
@ -41,7 +41,7 @@ server {
|
||||||
proxy_read_timeout 90; #should be in sync with gunicorn timeout
|
proxy_read_timeout 90; #should be in sync with gunicorn timeout
|
||||||
proxy_connect_timeout 90; #should be in sync with gunicorn timeout
|
proxy_connect_timeout 90; #should be in sync with gunicorn timeout
|
||||||
if (!-f $request_filename) {
|
if (!-f $request_filename) {
|
||||||
proxy_pass http:/127.0.0.1:2620;
|
proxy_pass http://127.0.0.1:2620;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
client_max_body_size 32m;
|
client_max_body_size 32m;
|
||||||
|
|
|
@ -40,16 +40,19 @@ TEMPLATE_DEBUG = DEBUG
|
||||||
JSON_DEBUG = False
|
JSON_DEBUG = False
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
MANAGE="sudo -H -u pandora python manage.py"
|
||||||
|
|
||||||
cd /srv/pandora/pandora
|
cd /srv/pandora/pandora
|
||||||
sudo -u pandora python manage.py syncdb --noinput
|
$MANAGE syncdb --noinput
|
||||||
sudo -u pandora python manage.py sqlfindindex | sudo -u pandora python manage.py dbshell
|
$MANAGE migrate
|
||||||
echo "UPDATE django_site SET domain = '$HOST.local', name = '$HOST.local' WHERE 1=1;" | sudo -u pandora python manage.py dbshell
|
|
||||||
echo "DB_GIN_TRGM = True" >> /srv/pandora/pandora/local_settings.py
|
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
|
mkdir /srv/pandora/data
|
||||||
chown -R pandora:pandora /srv/pandora
|
chown -R pandora:pandora /srv/pandora
|
||||||
sudo -u pandora python manage.py update_static
|
$MANAGE update_static
|
||||||
sudo -u pandora python manage.py collectstatic -l --noinput
|
$MANAGE collectstatic -l --noinput
|
||||||
|
|
||||||
cp /srv/pandora/etc/init/* /etc/init/
|
cp /srv/pandora/etc/init/* /etc/init/
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue