Spaces:
Sleeping
Sleeping
Raymond Weitekamp
commited on
Commit
·
21e190a
1
Parent(s):
5d6474b
Reduce Nginx log noise by adjusting log levels
Browse files- Dockerfile +12 -2
Dockerfile
CHANGED
|
@@ -56,13 +56,20 @@ RUN chmod +x start.sh
|
|
| 56 |
|
| 57 |
# Create nginx configuration for port forwarding
|
| 58 |
RUN echo 'worker_processes 1;\n\
|
| 59 |
-
error_log stderr
|
| 60 |
pid /run/nginx/nginx.pid;\n\
|
| 61 |
events {\n\
|
| 62 |
worker_connections 1024;\n\
|
| 63 |
}\n\
|
| 64 |
http {\n\
|
| 65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
client_max_body_size 0;\n\
|
| 67 |
\n\
|
| 68 |
upstream nicegui {\n\
|
|
@@ -82,6 +89,9 @@ http {\n\
|
|
| 82 |
listen 7860;\n\
|
| 83 |
server_name localhost;\n\
|
| 84 |
\n\
|
|
|
|
|
|
|
|
|
|
| 85 |
# Main app (NiceGUI)\n\
|
| 86 |
location / {\n\
|
| 87 |
proxy_pass http://nicegui;\n\
|
|
|
|
| 56 |
|
| 57 |
# Create nginx configuration for port forwarding
|
| 58 |
RUN echo 'worker_processes 1;\n\
|
| 59 |
+
error_log stderr error;\n\
|
| 60 |
pid /run/nginx/nginx.pid;\n\
|
| 61 |
events {\n\
|
| 62 |
worker_connections 1024;\n\
|
| 63 |
}\n\
|
| 64 |
http {\n\
|
| 65 |
+
# Disable access logging for normal requests\n\
|
| 66 |
+
access_log off;\n\
|
| 67 |
+
# Only log errors\n\
|
| 68 |
+
error_log stderr error;\n\
|
| 69 |
+
\n\
|
| 70 |
+
# Ignore common client disconnect errors\n\
|
| 71 |
+
log_not_found off;\n\
|
| 72 |
+
\n\
|
| 73 |
client_max_body_size 0;\n\
|
| 74 |
\n\
|
| 75 |
upstream nicegui {\n\
|
|
|
|
| 89 |
listen 7860;\n\
|
| 90 |
server_name localhost;\n\
|
| 91 |
\n\
|
| 92 |
+
# Disable logging of client connection resets\n\
|
| 93 |
+
proxy_ignore_client_abort on;\n\
|
| 94 |
+
\n\
|
| 95 |
# Main app (NiceGUI)\n\
|
| 96 |
location / {\n\
|
| 97 |
proxy_pass http://nicegui;\n\
|