Skip to content

Commit fa8af80

Browse files
committed
feat(entrypoint): parametrize default proxy_cache_path values
ref: http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_path allows tuning values without cutting a new image
1 parent cdddeb3 commit fa8af80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ CACHE_MAX_SIZE=${CACHE_MAX_SIZE:-32g}
102102

103103
# The cache directory. This can get huge. Better to use a Docker volume pointing here!
104104
# Set to 32gb which should be enough
105-
echo "proxy_cache_path /docker_mirror_cache levels=1:2 max_size=$CACHE_MAX_SIZE inactive=60d keys_zone=cache:10m use_temp_path=off;" > /etc/nginx/conf.d/cache_max_size.conf
105+
echo "proxy_cache_path /docker_mirror_cache levels=1:2 max_size=$CACHE_MAX_SIZE min_free=${CACHE_MIN_FREE:-0} inactive=${CACHE_INACTIVE_TIME:-60d} keys_zone=cache:10m use_temp_path=off manager_threshold=${CACHE_MANAGER_THRESHOLD:-200ms} manager_sleep=${CACHE_MANAGER_SLEEP:-50ms} manager_files=${CACHE_MANAGER_FILES:-100} loader_files=${CACHE_LOADER_FILES:-100} loader_threshold=${CACHE_LOADER_THRESHOLD:-200ms} loader_sleep=${CACHE_MANAGER_SLEEP:-50ms};" > /etc/nginx/conf.d/cache_max_size.conf
106106

107107
# Manifest caching configuration. We generate config based on the environment vars.
108108
echo -n "" >/etc/nginx/nginx.manifest.caching.config.conf

0 commit comments

Comments
 (0)