From 77a80dd3222340efb4c56ded084acaad1a4e226a Mon Sep 17 00:00:00 2001 From: ajurna Date: Wed, 14 Oct 2026 12:11:07 +0100 Subject: [PATCH] **Relocate Nginx configuration to the compose directory** - Moved `nginx.conf` from `cbreader/settings/` to `compose/` for better organization of deployment-specific files. - Updated `docker-compose.yml` to reference the new path for Nginx configuration. --- cbreader/settings/nginx.conf | 30 ------------------------------ docker-compose.yml | 2 +- 2 files changed, 1 insertion(+), 31 deletions(-) delete mode 100644 cbreader/settings/nginx.conf diff --git a/cbreader/settings/nginx.conf b/cbreader/settings/nginx.conf deleted file mode 100644 index 168d09f..0000000 --- a/cbreader/settings/nginx.conf +++ /dev/null @@ -1,30 +0,0 @@ -upstream cbwebreader_django { - server cbwebreader:8000; -} - -server { - - listen 80; - - # nginx compresses only text/html by default, so the bundle and CSS need explicit types. - gzip on; - gzip_comp_level 6; - gzip_min_length 1024; - gzip_types text/plain text/css application/javascript application/json image/svg+xml application/wasm; - gzip_vary on; - - location / { - proxy_pass http://cbwebreader_django; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Host $host; - proxy_redirect off; - } - - location /static/ { - alias /static/; - } - location /media/ { - alias /media/; - } - -} diff --git a/docker-compose.yml b/docker-compose.yml index d194a30..483c70b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -55,7 +55,7 @@ services: volumes: - static_files:/static - media_files:/media - - ./cbreader/settings/nginx.conf:/etc/nginx/conf.d/default.conf + - ./compose/nginx.conf:/etc/nginx/conf.d/default.conf ports: - "${WEB_PORT:-8337}:80" depends_on: