/rails_nginx_http_push

Demo of Rails app with Nginx HTTP Push Module

Primary LanguageRuby

--------------------------------------------------------------------------------
What?
--------------------------------------------------------------------------------

Demo of Rails app using Nginx HTTP Push module and Delayed Job -- but could be 
anything.

--------------------------------------------------------------------------------
Install and configure Nginx with the HTTP Push Module
--------------------------------------------------------------------------------

wget http://pushmodule.slact.net/downloads/nginx_http_push_module-0.692.tar.gz
tar zxf nginx_http_push_module-0.692.tar.gz 
wget http://nginx.org/download/nginx-1.0.4.tar.gz
tar zxf nginx-1.0.4.tar.gz 
cd nginx-1.0.4
./configure --add-module=../nginx_http_push_module-0.692
make
sudo make install # to /usr/local/nginx

--------------------------------------------------------------------------------
Create Nginx config and start the server
--------------------------------------------------------------------------------

sudo cp <app_root>/config/nginx.conf /usr/local/nginx/conf/nginx.conf
sudo vi /usr/local/nginx/conf/nginx.conf # edit to taste
sudo /usr/local/nginx/sbin/nginx

--------------------------------------------------------------------------------
Install gems, create the database and go
--------------------------------------------------------------------------------

bundle install --binstubs
bin/rake db:migrate
bin/foreman start -p 3000

http://localhost:8000 # port depends on nginx.conf