From 2fb751212dcd07155c199631629fa52038cb16e4 Mon Sep 17 00:00:00 2001 From: Jonny McCullagh Date: Tue, 6 Dec 2022 10:58:13 +0000 Subject: [PATCH] single image nginx logs to stdout --- hosting/single/Dockerfile | 3 ++- hosting/single/nginx/nginx-default-site.conf | 3 ++- hosting/single/nginx/nginx.conf | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hosting/single/Dockerfile b/hosting/single/Dockerfile index 58796f0362..5127db9897 100644 --- a/hosting/single/Dockerfile +++ b/hosting/single/Dockerfile @@ -61,7 +61,8 @@ ADD hosting/single/nginx/nginx.conf /etc/nginx ADD hosting/single/nginx/nginx-default-site.conf /etc/nginx/sites-enabled/default RUN mkdir -p /var/log/nginx && \ touch /var/log/nginx/error.log && \ - touch /var/run/nginx.pid + touch /var/run/nginx.pid && \ + usermod -a -G tty www-data WORKDIR / RUN mkdir -p scripts/integrations/oracle diff --git a/hosting/single/nginx/nginx-default-site.conf b/hosting/single/nginx/nginx-default-site.conf index 9a5ec91c1f..acadb06250 100644 --- a/hosting/single/nginx/nginx-default-site.conf +++ b/hosting/single/nginx/nginx-default-site.conf @@ -2,7 +2,8 @@ server { listen 80 default_server; listen [::]:80 default_server; server_name _; - + error_log /dev/stderr warn; + access_log /dev/stdout main; client_max_body_size 1000m; ignore_invalid_headers off; proxy_buffering off; diff --git a/hosting/single/nginx/nginx.conf b/hosting/single/nginx/nginx.conf index 1e5d1c20d2..c86e3877f3 100644 --- a/hosting/single/nginx/nginx.conf +++ b/hosting/single/nginx/nginx.conf @@ -1,5 +1,5 @@ user www-data www-data; -error_log /var/log/nginx/error.log; +error_log /dev/stderr warn; pid /var/run/nginx.pid; worker_processes auto; worker_rlimit_nofile 8192;