This commit is contained in:
Joseph Schorr 2014-01-08 22:09:07 -05:00
commit a420de90b1
4 changed files with 15 additions and 10 deletions

View file

@ -1,26 +1,25 @@
to prepare a new host:
```
sudo apt-get install software-properties-common
sudo apt-add-repository -y ppa:nginx/stable
sudo apt-get update
sudo apt-get install -y git python-virtualenv python-dev phantomjs libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev libevent-dev
sudo apt-get install -y nginx-full
sudo apt-get install -y git python-virtualenv python-dev phantomjs libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev libevent-dev gdebi-core
```
check out the code:
```
git clone https://bitbucket.org/yackob03/quay.git
cd quay
virtualenv --distribute venv
source venv/bin/activate
pip install -r requirements.txt
sudo gdebi --n binary_dependencies/*.deb
```
running:
```
sudo mkdir -p /mnt/nginx/ && sudo nginx -c `pwd`/nginx.conf
sudo mkdir -p /mnt/nginx/ && sudo /usr/local/nginx/sbin/nginx -c `pwd`/nginx.conf
STACK=prod gunicorn -c gunicorn_config.py application:application
```

Binary file not shown.

View file

@ -11,7 +11,7 @@ events {
http {
types_hash_max_size 2048;
include /etc/nginx/mime.types;
include /usr/local/nginx/conf/mime.types.default;
default_type application/octet-stream;
access_log /mnt/nginx/nginx.access.log combined;
@ -72,6 +72,9 @@ http {
proxy_redirect off;
proxy_buffering off;
proxy_request_buffering off;
proxy_set_header Transfer-Encoding $http_transfer_encoding;
proxy_pass http://app_server;
proxy_read_timeout 2000;
proxy_temp_path /mnt/nginx/proxy_temp 1 2;

View file

@ -1,8 +1,8 @@
worker_processes 8;
user nobody nogroup;
pid /tmp/nginx.pid;
error_log /tmp/nginx.error.log;
pid /mnt/nginx/nginx.pid;
error_log /mnt/nginx/nginx.error.log;
events {
worker_connections 1024;
@ -11,10 +11,10 @@ events {
http {
types_hash_max_size 2048;
include /etc/nginx/mime.types;
include /usr/local/nginx/conf/mime.types.default;
default_type application/octet-stream;
access_log /tmp/nginx.access.log combined;
access_log /mnt/nginx/nginx.access.log combined;
sendfile on;
gzip on;
@ -70,6 +70,9 @@ http {
proxy_redirect off;
proxy_buffering off;
proxy_request_buffering off;
proxy_set_header Transfer-Encoding $http_transfer_encoding;
proxy_pass http://app_server;
proxy_read_timeout 2000;
proxy_temp_path /mnt/nginx/proxy_temp 1 2;