|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+#!/usr/bin/env bash
|
|
|
2
|
+
|
|
|
3
|
+cd /var/www/oscar/builds/demo/
|
|
|
4
|
+
|
|
|
5
|
+# Update any dependencies
|
|
|
6
|
+source ../../virtualenvs/demo/bin/activate
|
|
|
7
|
+python setup.py develop
|
|
|
8
|
+pip install -r requirements.txt
|
|
|
9
|
+
|
|
|
10
|
+# Run any new migrations
|
|
|
11
|
+cd sites/demo
|
|
|
12
|
+./manage.py syncdb --noinput
|
|
|
13
|
+./manage.py migrate
|
|
|
14
|
+./manage.py collectstatic --noinput
|
|
|
15
|
+
|
|
|
16
|
+# Re-compile python code
|
|
|
17
|
+touch deploy/wsgi/demo.wsgi
|
|
|
18
|
+
|
|
|
19
|
+# Copy down server config files
|
|
|
20
|
+cp deploy/nginx/demo.conf /etc/nginx/sites-enabled/demo.oscar.tangentlabs.co.uk
|
|
|
21
|
+/etc/init.d/nginx configtest && /etc/init.d/nginx force-reload
|
|
|
22
|
+
|
|
|
23
|
+cp deploy/apache2/demo.conf /etc/apache2/sites-enabled/demo.oscar.tangentlabs.co.uk
|
|
|
24
|
+/etc/init.d/apache2 reload
|