Skip to content

Commit

Permalink
fix(load_test): Fix nginx config by adding instructions to the correc…
Browse files Browse the repository at this point in the history
…t file (#1054)
  • Loading branch information
themarcelor authored Dec 29, 2019
1 parent ecb0829 commit 3c898f0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Docker/python-nginx/python3.6-alpine3.7/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ if [ ! -z $NGINX_RATE_LIMIT ]; then
# Add rate_limit config
rate_limit_conf="\ \ \ \ limit_req_zone \$binary_remote_addr zone=one:10m rate=${NGINX_RATE_LIMIT}r/s;"
sed -i "/http\ {/a ${rate_limit_conf}" /etc/nginx/nginx.conf
limit_req_config="\ \ \ \ \ \ \ \ limit_req zone=one;"
sed -i "/location\ \/\ {/a ${limit_req_config}" /etc/nginx/conf.d/uwsgi.conf
if [ -f /etc/nginx/sites-available/uwsgi.conf ]; then
limit_req_config="\ \ \ \ \ \ \ \ limit_req zone=one;"
sed -i "/location\ \/\ {/a ${limit_req_config}" /etc/nginx/sites-available/uwsgi.conf
fi
fi

# Get the maximum upload file size for Nginx, default to 0: unlimited
Expand Down

0 comments on commit 3c898f0

Please sign in to comment.