Skip to content

Commit

Permalink
- revert bind-mount: docker-compose.dev.yml
Browse files Browse the repository at this point in the history
- enabled nginx compression
  • Loading branch information
m-GDEV committed Nov 14, 2024
1 parent 241fb39 commit 62dd28a
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
ports:
- "9005:8080"
volumes:
- ./data2:/data
- ./data:/data

wardrobe-manager-presentation:
container_name: wardrobe-manager-presentation
Expand Down
31 changes: 31 additions & 0 deletions docker/WardrobeManager.Presentation/nginx.conf
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down

0 comments on commit 62dd28a

Please sign in to comment.