Skip to content

Commit

Permalink
updating DEPLOY doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark MacGillivray committed Apr 23, 2012
1 parent ceac699 commit 5b9a101
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 2 deletions.
68 changes: 67 additions & 1 deletion DEPLOY.rst
Original file line number Diff line number Diff line change
@@ -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


2 changes: 2 additions & 0 deletions bibserver/templates/record.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name = 'bibserver',
version = '0.3',
version = '0.5.1',
packages = find_packages(),
install_requires = [
"Flask==0.7.2",
Expand Down

0 comments on commit 5b9a101

Please sign in to comment.