Created
November 17, 2017 09:21
-
-
Save zernel/1cebc74d9b576ebd7860f338a2ede7b3 to your computer and use it in GitHub Desktop.
Revisions
-
zernel created this gist
Nov 17, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ https://domain { gzip root /apps/app/public log dev.access.log proxy / unix:///apps/app/tmp/sockets/puma.sock { fail_timeout 300s transparent header_upstream X-Forwarded-Ssl on except /assets /fonts /robots.txt /favicon.ico /404.html /422.html /500.html } } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,33 @@ # /etc/nginx/conf.d/app.conf upstream app { # Path to Puma SOCK file, as defined previously server unix:///apps/app/tmp/sockets/puma.sock fail_timeout=0; } server { listen 80; server_name domain; root /apps/app/public; # try_files $uri/index.html $uri @app; location / { proxy_pass http://app; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect off; } location ~ ^/assets/ { root /apps/app/public; expires max; gzip_static on; gzip_vary on; add_header Cache-Control public; } error_page 500 502 503 504 /500.html; client_max_body_size 4G; keepalive_timeout 10; } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ # config/puma.rb app_path = '/apps/app' bind "unix://#{app_path}/tmp/sockets/puma.sock" pidfile "#{app_path}/tmp/pids/puma.pid" state_path "#{app_path}/tmp/sockets/puma.state" directory "#{app_path}" # daemonize true