Sha256: 85b494050666ff08042f5faabeea6ea76ff1b846b04b23a01820287b1ffaffab

Contents?: true

Size: 1.15 KB

Versions: 4

Compression:

Stored size: 1.15 KB

Contents

{% if be_app_repo is defined %}
upstream unicorn {
  server unix:{{unicorn_sockfile}} fail_timeout=0;
}
{% endif %}

server {
  listen 80 default deferred;

  # server_name example.com;

{% if fe_app_local_path is defined%}
  root {{ fe_app_path }}/dist;
{% else %}
  root {{ be_app_path }}/public;
{% endif %}

  if (-f $document_root/system/maintenance.html) {
    return 503;
  }
  error_page 503 @maintenance;
  location @maintenance {
    rewrite  ^(.*)$  /system/maintenance.html last;
    break;
  }

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

{% if be_app_repo is defined %}
  try_files $uri/index.html $uri @unicorn;
  location @unicorn {
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_redirect off;
    proxy_pass http://unicorn;
  }
{% endif %}

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

  if (-f $document_root/system/maintenance.html) {
    return 503;
  }
  error_page 503 @maintenance;
  location @maintenance {
    rewrite  ^(.*)$  /system/maintenance.html last;
    break;
  }
}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
taperole-1.2.4 roles/nginx/templates/nginx_unicorn.j2
taperole-1.2.3 roles/nginx/templates/nginx_unicorn.j2
taperole-1.2.2 roles/nginx/templates/nginx_unicorn.j2
taperole-1.2.1 roles/nginx/templates/nginx_unicorn.j2