From a86e90c9e82de0a735b0b8ea63c0f573fc9eff45 Mon Sep 17 00:00:00 2001 From: NuclearRedeye Date: Sun, 7 Apr 2024 22:40:44 +0100 Subject: [PATCH] fix: nginx container logging is overly verbose --- .nginx/nginx.conf | 15 +++++++++++++++ Makefile | 4 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 .nginx/nginx.conf diff --git a/.nginx/nginx.conf b/.nginx/nginx.conf new file mode 100644 index 0000000..78904e2 --- /dev/null +++ b/.nginx/nginx.conf @@ -0,0 +1,15 @@ +events { + worker_connections 1024; +} +http { + server { + include mime.types; + + listen 80; + + location / { + root /usr/share/nginx/html; + add_header Cache-Control 'no-store'; + } + } +} diff --git a/Makefile b/Makefile index e91e143..6f28aaf 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ PROJECT := $(notdir $(CURDIR)) -NODE_VERSION ?= hydrogen +NODE_VERSION ?= iron NGINX_VERSION ?= alpine PORT ?= 8080 @@ -106,4 +106,4 @@ watch: # Target that builds and runs a debug instance of the project. dev: debug @echo "Starting '$(PROJECT)' on 'http://localhost:$(PORT)'..." - @docker run --rm --name $(PROJECT) -p $(PORT):80 -e NGINX_ENTRYPOINT_QUIET_LOGS=1 -v $(CURDIR)/dist/debug:/usr/share/nginx/html/:ro nginx:$(NGINX_VERSION) \ No newline at end of file + @docker run --rm --name $(PROJECT) -p $(PORT):80 -e NGINX_ENTRYPOINT_QUIET_LOGS=1 -v '$(CURDIR)/.nginx/nginx.conf:/etc/nginx/nginx.conf:ro' -v $(CURDIR)/dist/debug:/usr/share/nginx/html/:ro nginx:$(NGINX_VERSION) \ No newline at end of file