Sha256: 58bfc76abd56f08e35598a406ad12f8a71b1950355a6a0158e99e59efbe02411

Contents?: true

Size: 1.02 KB

Versions: 6

Compression:

Stored size: 1.02 KB

Contents

upstream <%= node['scratchify']['app_name'] %>_upstream {
  server unix:/home/deploy/<%= node['scratchify']['app_name'] %>/shared/tmp/sockets/application.sock fail_timeout=0;
}

server {
  listen 80 default_server;
  server_name localhost;

  client_max_body_size 10M;
  keepalive_timeout 10;

  root /home/deploy/<%= node['scratchify']['app_name'] %>/current/public;
  error_page 500 503 502 504 /500.html;
  try_files $uri/index.html $uri @<%= node['scratchify']['app_name'] %>_location;

  location @<%= node['scratchify']['app_name'] %>_location {
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_redirect off;

    proxy_pass http://<%= node['scratchify']['app_name'] %>_upstream;
    access_log /home/deploy/<%= node['scratchify']['app_name'] %>/shared/log/nginx.access.log;
    error_log /home/deploy/<%= node['scratchify']['app_name'] %>/shared/log/nginx.error.log;
  }

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

Version data entries

6 entries across 3 versions & 1 rubygems

Version Path
from-scratch-0.7.0 cookbooks/scratchify/templates/nginx.erb
from-scratch-0.7.0 templates/nginx.erb
from-scratch-0.6.0 cookbooks/scratchify/templates/nginx.erb
from-scratch-0.6.0 templates/nginx.erb
from-scratch-0.5.0 cookbooks/scratchify/templates/nginx.erb
from-scratch-0.5.0 templates/nginx.erb