Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
An example rails application / blog
Ruby CSS JavaScript
branch: master
Failed to load latest commit information.
app
config remove capistrano, preparing to the new deploy
db initial
doc
lib deploy: remove duplicate error status line on failure
log initial
public initial
script initial
vendor initial
.gitignore initial
Gemfile starting deploy implementation based on remote-exec
Gemfile.lock deploy: use newer version of remote-exec with improved output from Re…
README.md initial README
Rakefile initial
config.ru initial

README.md

Example Rails application

  1. Deployment with Capistrano
  2. Server with Unicorn + Nginx proxy
  3. Database with Sqlite3

Example nginx proxy config

server {
  listen   80;
  server_name  ad.niczsoft.com;

  access_log  /var/log/nginx/ad.niczsoft.com.access.log;
  error_log  /var/log/nginx/ad.niczsoft.com.error.log;

  location / {
    proxy_pass        http://unix:/home/ad/app/shared/pids/unicorn.socket;
    proxy_set_header  X-Forwarded-For   $proxy_add_x_forwarded_for;
    proxy_set_header  X-Real-IP         $remote_addr;
    proxy_set_header  Host              $http_host;
    # this is required for HTTPS (another server section):
    # proxy_set_header X-Forwarded-Proto https;
  }
}
Something went wrong with that request. Please try again.