diff --git a/9.0/docker-entrypoint.sh b/9.0/docker-entrypoint.sh index a078435..ac1c7bb 100755 --- a/9.0/docker-entrypoint.sh +++ b/9.0/docker-entrypoint.sh @@ -7,4 +7,13 @@ echo "${NGX_HTPASSWD}" > /etc/nginx/htpasswd /usr/local/bin/confd -onetime -backend env +if [[ -z "${NGX_SPECIFIC_CACHE}" ]] +then + echo "CREATE empty /etc/nginx/specific_cache.conf" + touch /etc/nginx/specific_cache.conf +else + echo "OVERRIDE /etc/nginx/specific_cache.conf" + echo "${NGX_SPECIFIC_CACHE}" > /etc/nginx/specific_cache.conf +fi + exec "$@" diff --git a/9.0/templates/nginx.conf.tmpl b/9.0/templates/nginx.conf.tmpl index 10c2efa..0aa46bf 100644 --- a/9.0/templates/nginx.conf.tmpl +++ b/9.0/templates/nginx.conf.tmpl @@ -77,7 +77,7 @@ http { proxy_max_temp_file_size 2048m; proxy_temp_file_write_size 64k; - proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=one:10m inactive=60m; + proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=one:100m inactive=60m; include /etc/nginx/proxy_headers.conf; @@ -148,6 +148,8 @@ http { try_files =404 @cached; } + include /etc/nginx/specific_cache.conf; + # warning: /web/content reads ir.attachment, it would not be safe to # cache other files than .js / .css which can depend on users rights location ~* ^/web/content/.+\.(js|css)$ {