diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index d201ccd..9e67d4b 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -11,7 +11,7 @@ services: ports: - "9005:8080" volumes: - - ./data2:/data + - ./data:/data wardrobe-manager-presentation: container_name: wardrobe-manager-presentation diff --git a/docker/WardrobeManager.Presentation/nginx.conf b/docker/WardrobeManager.Presentation/nginx.conf index a44ef7d..5605047 100644 --- a/docker/WardrobeManager.Presentation/nginx.conf +++ b/docker/WardrobeManager.Presentation/nginx.conf @@ -1,5 +1,36 @@ events { } http { + # Enable gzip compression for better performance + gzip on; # Enables gzip compression for HTTP responses + gzip_disable "msie6"; # Disables gzip for older versions of Internet Explorer (specifically IE6) + gzip_vary on; # Adds 'Vary: Accept-Encoding' header, enabling client caching based on gzip support + gzip_proxied any; # Compresses responses even when NGINX is acting as a reverse proxy + gzip_comp_level 6; # Sets the compression level (1-9); 6 offers a good balance of compression and CPU usage + gzip_buffers 16 8k; # Sets the buffer size for gzip compression; allocates 16 buffers of 8k each + gzip_http_version 1.1; # Limits gzip compression to requests using HTTP/1.1 or higher + gzip_min_length 256; # Only compresses responses larger than 256 bytes + gzip_types # Specifies MIME types for files to compress + application/atom+xml # Atom feeds + application/geo+json # GeoJSON + application/javascript # JavaScript files + application/x-javascript # Alternative MIME type for JavaScript + application/json # JSON data + application/ld+json # JSON-LD (Linked Data) + application/manifest+json # Web application manifest files + application/rdf+xml # RDF files in XML + application/rss+xml # RSS feeds + application/xhtml+xml # XHTML + application/xml # General XML files + font/eot # Embedded OpenType fonts + font/otf # OpenType fonts + font/ttf # TrueType fonts + image/svg+xml # SVG images + text/css # CSS stylesheets + text/javascript # JavaScript files (old MIME type) + text/plain # Plain text files + text/xml; # XML in text + + # Sends stylesheets using the right mime type (necessary, breaks Blazor WASM if not used) include /etc/nginx/mime.types; server {