diff --git a/deploy-this/deploy-dc.yml b/deploy-this/deploy-dc.yml index 8f25592..321c67d 100755 --- a/deploy-this/deploy-dc.yml +++ b/deploy-this/deploy-dc.yml @@ -22,10 +22,16 @@ services: # Cache - type: tmpfs - target: /var/cache/nginx + target: /var/cache/nginx2GB tmpfs: size: 2147483648 # 2GB w bajtach mode: 1777 + + - type: tmpfs + target: /var/cache/nginx05GB + tmpfs: + size: 547483648 # 512 kb w bajtach + mode: 1777 # Certyfikaty SSL - ${DOCKER_DATA}/letsencrypt:/letsencrypt:rw diff --git a/nginx-config/https/https-bodypainter-eu.conf b/nginx-config/https/https-bodypainter-eu.conf index 25f430c..6eff7be 100755 --- a/nginx-config/https/https-bodypainter-eu.conf +++ b/nginx-config/https/https-bodypainter-eu.conf @@ -2,8 +2,8 @@ limit_req_zone $binary_remote_addr zone=ip_limit:10m rate=2r/s; # Konfiguracja cache (nowa część) - proxy_cache_path /var/cache/nginx/static levels=1:2 keys_zone=STATIC:50m inactive=24h max_size=500m use_temp_path=off; - proxy_cache_path /var/cache/nginx/media levels=1:2 keys_zone=MEDIA:100m inactive=7d max_size=2g use_temp_path=off; + proxy_cache_path /var/cache/nginx05GB levels=1:2 keys_zone=STATIC:50m inactive=24h max_size=500m use_temp_path=off; + proxy_cache_path /var/cache/nginx2GB levels=1:2 keys_zone=MEDIA:100m inactive=7d max_size=2g use_temp_path=off; server { listen 443 ssl; @@ -46,7 +46,8 @@ proxy_cache_valid 200 30d; proxy_cache_use_stale error timeout updating; proxy_cache_lock on; - add_header X-Cache-Status $upstream_cache_status; + proxy_cache_key "$scheme$host$request_uri"; + add_header X-Cache-Status $upstream_cache_status always; expires 1y; access_log off; @@ -54,17 +55,4 @@ proxy_hide_header Set-Cookie; } - location ~* \.(css|js)$ { - proxy_pass http://arti24-container:3000; - proxy_cache STATIC; - proxy_cache_valid 200 7d; - proxy_cache_use_stale error timeout updating; - proxy_cache_lock on; - add_header X-Cache-Status $upstream_cache_status; - expires 1y; - access_log off; - - proxy_ignore_headers Cache-Control Set-Cookie; - proxy_hide_header Set-Cookie; - } } \ No newline at end of file