Sha256: 57d45e8feabec1a954076ec8311810fcb348ae367f65b9a12ae83fe537734efc

Contents?: true

Size: 813 Bytes

Versions: 3

Compression:

Stored size: 813 Bytes

Contents

upstream backend_<%= fetch(:application) %> {
  server unix:/tmp/unicorn.<%= fetch(:application) %>.sock fail_timeout=0;
}

server {
  server_name <%= fetch(:server_name) %>;
  listen 80 default deferred;

  root <%= current_path %>/public;

  location ^~ /assets/ {
    gzip_static on;
    expires max;
    add_header Cache-Control public;
  }

  try_files $uri/index.html $uri @backend_<%= fetch(:application) %>;
  location @backend_<%= fetch(:application) %> {
    proxy_set_header X-Forwarded-For  $proxy_add_x_forwarded_for;
    proxy_set_header Host             $http_host;
    proxy_set_header X-Real-IP        $remote_addr;
    proxy_redirect off;
    proxy_pass http://backend_<%= fetch(:application) %>;
  }

  error_page 500 502 503 504 /500.html;
  client_max_body_size 4G;
  keepalive_timeout 10;
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
capistrano-devops-0.0.15 lib/capistrano/devops/templates/nginx_unicorn.erb
capistrano-devops-0.0.14 lib/capistrano/devops/templates/nginx_unicorn.erb
capistrano-devops-0.0.13 lib/capistrano/devops/templates/nginx_unicorn.erb