From b96709275937c93de14c38fc758674275e7c2943 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Wed, 31 Aug 2022 16:52:32 +0200 Subject: [PATCH] Development: disable NGINX logs We were using `logging.driver: none` on Docker Compose's file, but it stopped working and I was not able to enable it again. So, for now, I'm just disabling the logging from NGINX itself because they are too annoying when working locally. --- dockerfiles/nginx/proxito.conf.template | 4 ++++ dockerfiles/nginx/web.conf.template | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/dockerfiles/nginx/proxito.conf.template b/dockerfiles/nginx/proxito.conf.template index e1c10f0b07d..9a1d5c72ffe 100644 --- a/dockerfiles/nginx/proxito.conf.template +++ b/dockerfiles/nginx/proxito.conf.template @@ -3,6 +3,10 @@ server { listen 80 default_server; server_name $NGINX_PROXITO_SERVER_NAME; + # Docker Compose's "logging.driver: none" is not working anymore. + # So, we are disabling the logs from NGINX directly. + access_log off; + # TODO: serve the favicon.ico from the project/version itself instead location /favicon.ico { proxy_pass http://storage:9000/static/images/favicon.ico; diff --git a/dockerfiles/nginx/web.conf.template b/dockerfiles/nginx/web.conf.template index b9da00fbc97..14296611ea9 100644 --- a/dockerfiles/nginx/web.conf.template +++ b/dockerfiles/nginx/web.conf.template @@ -4,6 +4,10 @@ server { # This should match settings.PRODUCTION_DOMAIN server_name $NGINX_WEB_SERVER_NAME; + # Docker Compose's "logging.driver: none" is not working anymore. + # So, we are disabling the logs from NGINX directly. + access_log off; + location /favicon.ico { proxy_pass http://storage:9000/static/images/favicon.ico; break;