Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

updating DEPLOY doc

  • Loading branch information...
commit 5b9a101b646550fcc500f8d416620bf386608d8f 1 parent ceac699
@markmacgillivray markmacgillivray authored
Showing with 70 additions and 2 deletions.
  1. +67 −1 DEPLOY.rst
  2. +2 −0  bibserver/templates/record.html
  3. +1 −1  setup.py
View
68 DEPLOY.rst
@@ -1 +1,67 @@
-gunicorn -w 4 -b 127.0.0.01:5050 bibserver.web:app
+# install nginx and supervisor
+apt-get install nginx supervisord
+
+
+# create an nginx site config named e.g. bibsoup.net
+# default location is /etc/nginx/sites-available
+# then symlink from /etc/nginx/sites-enabled
+upstream bibsoup_app_server {
+ # server unix:/tmp/gunicorn.sock fail_timeout=0;
+ # For a TCP configuration:
+ server 127.0.0.1:5050 fail_timeout=0;
+}
+
+server {
+ server_name bibsoup.net;
+
+ access_log /var/log/nginx/bibsoup.net.access.log;
+
+ server_name_in_redirect off;
+
+ client_max_body_size 20M;
+
+ location / {
+ ## straight-forward proxy
+ proxy_redirect off;
+ proxy_connect_timeout 75s;
+ proxy_read_timeout 180s;
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+
+ proxy_pass http://bibsoup_app_server;
+ }
+}
+
+
+# create a supervisord config named e.g. bibsoup.net.conf
+# default location is /etc/supervisor/conf.d
+[program:bibsoup.net]
+command=/home/okfn/var/srvc/%(program_name)s/bin/gunicorn -w 4 -b 127.0.0.1:5050 bibserver.web:app
+user=www-data
+directory=/home/okfn/var/srvc/%(program_name)s/src/bibserver
+stdout_logfile=/var/log/supervisor/%(program_name)s-access.log
+stderr_logfile=/var/log/supervisor/%(program_name)s-error.log
+autostart=true
+
+
+# create a virtualenv and get the latest bibserver code installed
+virtualenv bibsoup.net --no-site-packages
+cd bibsoup.net
+mkdir src
+cd bin
+source activate
+cd ../src
+git clone https://github.com/okfn/bibserver
+python setup.py install
+
+
+# create a local_config.json with details as necessary
+{
+ "ES_HOST" : "elasticsearch.okserver.org:9200"
+}
+
+
+# in the case of OKF service deployment, copy
+
+
View
2  bibserver/templates/record.html
@@ -80,10 +80,12 @@
<h3>Edit this record</h3>
</div>
<div class="span4">
+ <!--
<h3>More like this</h3>
{% for item in flt %}
<p>{{ item }}</p>
{% endfor %}
+ -->
</div>
</div>
View
2  setup.py
@@ -2,7 +2,7 @@
setup(
name = 'bibserver',
- version = '0.3',
+ version = '0.5.1',
packages = find_packages(),
install_requires = [
"Flask==0.7.2",
Please sign in to comment.
Something went wrong with that request. Please try again.