File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 12
12
keepalive_timeout 65 ;
13
13
sendfile on ;
14
14
15
- proxy_cache_path /cache/cache levels=1:2 keys_zone=cache:16m inactive=1y use_temp_path=off;
15
+ proxy_cache_path /cache/cache levels=1:2 keys_zone=cache:16m inactive=1y max_size=CACHE_MAX_SIZE use_temp_path=off;
16
16
resolver RESOLVER valid=30s;
17
17
18
18
# this is necessary for us to be able to disable request buffering in all cases
Original file line number Diff line number Diff line change 31
31
UPSTREAM_WITHOUT_PORT=$( echo ${UPSTREAM} | sed -r " s/.*:\/\/(.*):.*/\1/g" )
32
32
echo Using resolver $RESOLVER and $UPSTREAM [$( dig +short ${UPSTREAM_WITHOUT_PORT} ) ] as upstream.
33
33
34
+ CACHE_MAX_SIZE=${CACHE_MAX_SIZE:- 75g}
35
+ echo Using cache max size $CACHE_MAX_SIZE
36
+
34
37
CONFIG=/usr/local/openresty/nginx/conf/nginx.conf
35
38
36
39
# Update nginx config
37
40
sed -i -e s! UPSTREAM! " $UPSTREAM " ! g $CONFIG
38
41
sed -i -e s! PORT! " $PORT " ! g $CONFIG
39
42
sed -i -e s! RESOLVER! " $RESOLVER " ! g $CONFIG
43
+ sed -i -e s! CACHE_MAX_SIZE! " $CACHE_MAX_SIZE " ! g $CONFIG
40
44
41
45
# setup ~/.aws directory
42
46
AWS_FOLDER=' /root/.aws'
You can’t perform that action at this time.
0 commit comments