Add some readmes about how to run a new server as well as how to schedule the pre-render script.

This commit is contained in:
yackob03 2013-10-11 00:57:27 -04:00
parent 02c651ed36
commit 2d9c3f2c38
2 changed files with 33 additions and 0 deletions

View file

@ -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: running:
```
sudo nginx -c `pwd`/nginx.conf sudo nginx -c `pwd`/nginx.conf
STACK=prod gunicorn -D --workers 4 -b unix:/tmp/gunicorn.sock --worker-class eventlet -t 500 application:application STACK=prod gunicorn -D --workers 4 -b unix:/tmp/gunicorn.sock --worker-class eventlet -t 500 application:application
```

13
seo-snapshots/README.md Normal file
View file

@ -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
```