From 6404ff45e754a7058bd4e87e7e4e062550d28413 Mon Sep 17 00:00:00 2001 From: Tyler Mercier Date: Tue, 23 Jul 2013 11:15:57 -0600 Subject: using our version of unicorn.rb --- config/nginx_parley.txt | 8 ++++---- config/unicorn.rb | 2 +- config/unicorn_init.sh | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/config/nginx_parley.txt b/config/nginx_parley.txt index f1f7ccd..5a66e7d 100644 --- a/config/nginx_parley.txt +++ b/config/nginx_parley.txt @@ -5,7 +5,7 @@ upstream app_server { # single worker for timing out). # for UNIX domain socket setups: - server unix:/tmp/unicorn.parley.sock fail_timeout=0; + server unix:/home/demo/apps/parley/current/tmp/sockets/unicorn.sock fail_timeout=0; # for TCP setups, point these to your backend servers # server 192.168.0.7:8080 fail_timeout=0; @@ -35,7 +35,7 @@ server { keepalive_timeout 5; # path for static files - root /path/to/app/current/public; + root /home/demo/apps/parley/current/public; # Prefer to serve static files directly from nginx to avoid unnecessary # data copies from the application server. @@ -75,12 +75,12 @@ server { # per-response basis. # proxy_buffering off; - proxy_pass http://app_server; + proxy_pass http://localhost:8080; } # Rails error pages error_page 500 502 503 504 /500.html; location = /500.html { - root /path/to/app/current/public; + root /home/demo/apps/parley/current/public; } } diff --git a/config/unicorn.rb b/config/unicorn.rb index 6514417..b3e6286 100644 --- a/config/unicorn.rb +++ b/config/unicorn.rb @@ -27,7 +27,7 @@ working_directory "/home/demo/apps/parley" # available in 0.94.0+ # listen on both a Unix domain socket and a TCP port, # we use a shorter backlog for quicker failover when busy -listen "/tmp/unicorn.parley.sock", :backlog => 64 +listen "#{root}/tmp/sockets/unicorn.sock", :backlog => 64 listen 8080, :tcp_nopush => true # nuke workers after 30 seconds instead of 60 seconds (the default) diff --git a/config/unicorn_init.sh b/config/unicorn_init.sh index e6abd1c..a06e6ee 100644 --- a/config/unicorn_init.sh +++ b/config/unicorn_init.sh @@ -14,7 +14,7 @@ set -e TIMEOUT=${TIMEOUT-60} APP_ROOT=/home/demo/apps/parley/current PID=$APP_ROOT/tmp/pids/unicorn.pid -CMD="cd $APP_ROOT; bundle exec unicorn -D -c $APP_ROOT/config/unicorn.rb -E production" +CMD="cd $APP_ROOT; bundle exec unicorn -D -c config/unicorn.rb -E production" AS_USER=username set -u -- cgit v1.2.3