From 2d9c3f2c3888eb3371ef7be9e11375d2f4e358ee Mon Sep 17 00:00:00 2001 From: yackob03 Date: Fri, 11 Oct 2013 00:57:27 -0400 Subject: [PATCH] Add some readmes about how to run a new server as well as how to schedule the pre-render script. --- README.md | 20 ++++++++++++++++++++ seo-snapshots/README.md | 13 +++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 seo-snapshots/README.md diff --git a/README.md b/README.md index c3a52a523..02d4cbb2c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,24 @@ +to prepare a new host: + +``` +sudo apt-add-repository -y ppa:nginx/stable +sudo apt-get update +sudo apt-get install -y git python-virtualenv python-dev phantomjs +sudo apt-get install -y nginx-full +``` + +check out the code: + +``` +git clone https://bitbucket.org/yackob03/quay.git +virtualenv --distribute venv +source venv/bin/activate +pip install -r requirements.txt +``` + running: +``` sudo nginx -c `pwd`/nginx.conf STACK=prod gunicorn -D --workers 4 -b unix:/tmp/gunicorn.sock --worker-class eventlet -t 500 application:application +``` \ No newline at end of file diff --git a/seo-snapshots/README.md b/seo-snapshots/README.md new file mode 100644 index 000000000..1340fc7fe --- /dev/null +++ b/seo-snapshots/README.md @@ -0,0 +1,13 @@ +Follow the instructions to set up a host of the whole project before attempting to run. + +to run once: + +``` +python make_snapshot.py +``` + +cron line to update every 30 minutes: + +``` +0,30 * * * * cd /home/ubuntu/quay/seo-snapshots && ../venv/bin/python make_snapshot.py +``` \ No newline at end of file