From d87c350cd39f516eee9558bc49e700197ab3f71b Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Fri, 27 Oct 2023 10:18:54 +0200 Subject: [PATCH] Heroku: Remove obsolete nginx buildpack --- .buildpacks | 1 - config/nginx.conf.erb | 68 ------------------------------------------- 2 files changed, 69 deletions(-) delete mode 100644 config/nginx.conf.erb diff --git a/.buildpacks b/.buildpacks index d43323e6e0..b2fe41a730 100644 --- a/.buildpacks +++ b/.buildpacks @@ -1,2 +1 @@ -https://github.com/heroku/heroku-buildpack-nginx#37a84b640e419fac6e58b77433d87194f7496c03 https://github.com/Turbo87/heroku-buildpack-crates-io#7bc6b2637282e11206b42e9e5feddec058d527a2 diff --git a/config/nginx.conf.erb b/config/nginx.conf.erb deleted file mode 100644 index 55127c539b..0000000000 --- a/config/nginx.conf.erb +++ /dev/null @@ -1,68 +0,0 @@ -# Disable "daemon" mode, which causes nginx to run in the foreground -daemon off; - -# Define the number of worker processes (Heroku dynos have at least 4 cores) -worker_processes <%= ENV['NGINX_WORKERS'] || 4 %>; - -events { - # Explicitly force nginx to use the "epoll" connection processing method - # (see http://nginx.org/en/docs/events.html) - use epoll; - - accept_mutex on; - - # Set the maximum number of simultaneous connections that can be opened by a worker process - worker_connections 2048; -} - -http { - # Disable emitting nginx version on error pages and in the “Server” response header field - server_tokens off; - - # Disable access logs, since our axum application logs them too - access_log /dev/null; - # Write error logs to the default `heroku-buildpack-nginx` location - error_log logs/nginx/error.log; - - # Define common file name extension to MIME type mappings - include mime.types; - # Define the default MIME type of a response if none of the mappings from above match - default_type application/octet-stream; - - # Enable the use of the `sendfile` Linux API for sending files over the network - sendfile on; - - # Set the maximum allowed size of the client request body to 50 MB - client_max_body_size 50m; - - upstream app_server { - server localhost:8888 fail_timeout=0; - } - - server { - listen <%= ENV["PORT"] %>; - - # Set a catch-all server name (see http://nginx.org/en/docs/http/server_names.html) - server_name _; - - # Set a timeout during which a keep-alive client connection will stay open on the server side - keepalive_timeout 5; - - # Use the passed-in `Host` header for proxied requests instead of changing it to the `proxy_pass` value - proxy_set_header Host $http_host; - - # Disable `Location` and `Refresh` header rewriting for proxied responses - proxy_redirect off; - - # If the `X-Forwarded-Proto` request header does not contain `https` … - if ($http_x_forwarded_proto != 'https') { - # … return a "301 Moved Permanently" response to the HTTPS equivalent URL - rewrite ^ https://$host$request_uri? permanent; - } - - location / { - # Proxy all requests to our axum app server - proxy_pass http://app_server; - } - } -}