mirror of
https://github.com/dcarrillo/docker-nginx.git
synced 2025-01-06 20:16:48 +00:00
Bump nginx version to 1.18.0
This commit is contained in:
parent
7194da8358
commit
3c6503b98f
@ -9,7 +9,6 @@ ENV NGX_GEOIP2_VERSION $ARG_NGX_GEOIP2_VERSION
|
|||||||
# hadolint ignore=DL3018,DL3003,SC2086
|
# hadolint ignore=DL3018,DL3003,SC2086
|
||||||
RUN CONFIG=" \
|
RUN CONFIG=" \
|
||||||
--add-module=/tmp/ngx_http_geoip2_module-$NGX_GEOIP2_VERSION \
|
--add-module=/tmp/ngx_http_geoip2_module-$NGX_GEOIP2_VERSION \
|
||||||
--with-stream \
|
|
||||||
--with-http_ssl_module \
|
--with-http_ssl_module \
|
||||||
--with-http_v2_module \
|
--with-http_v2_module \
|
||||||
--with-http_stub_status_module \
|
--with-http_stub_status_module \
|
||||||
|
2
conf.env
2
conf.env
@ -1,3 +1,3 @@
|
|||||||
NGINX_VERSION=1.17.10
|
NGINX_VERSION=1.18.0
|
||||||
NGX_GEOIP2_VERSION=3.3
|
NGX_GEOIP2_VERSION=3.3
|
||||||
DOCKER_IMAGE=dcarrillo/nginx
|
DOCKER_IMAGE=dcarrillo/nginx
|
||||||
|
@ -79,5 +79,11 @@ http {
|
|||||||
location = /nginx_status {
|
location = /nginx_status {
|
||||||
stub_status on;
|
stub_status on;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location = /phpfpm_status {
|
||||||
|
include /usr/local/nginx/conf/fastcgi_params;
|
||||||
|
fastcgi_pass php:9000;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,7 @@ _cleanup()
|
|||||||
echo "Cleaning up..."
|
echo "Cleaning up..."
|
||||||
docker rm -f "${NGINX_VERSION}"_test > /dev/null 2>&1
|
docker rm -f "${NGINX_VERSION}"_test > /dev/null 2>&1
|
||||||
docker rm -f "${NGINX_VERSION}"_requester > /dev/null 2>&1
|
docker rm -f "${NGINX_VERSION}"_requester > /dev/null 2>&1
|
||||||
|
docker rm -f php > /dev/null 2>&1
|
||||||
rm -rf "$TMP_DIR"
|
rm -rf "$TMP_DIR"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,8 +62,14 @@ _check_if_is_ip()
|
|||||||
|
|
||||||
_setup_crypto_stuff
|
_setup_crypto_stuff
|
||||||
|
|
||||||
|
echo "Preparing dcarrillo/php"
|
||||||
|
docker run --name php --rm -d dcarrillo/php > /dev/null
|
||||||
|
docker exec -i php sh -c "echo 'pm.status_path = /phpfpm_status' \
|
||||||
|
>> /usr/local/etc/php-fpm.d/www.conf \
|
||||||
|
&& kill -USR2 1"
|
||||||
|
|
||||||
echo "Running container to be tested..."
|
echo "Running container to be tested..."
|
||||||
docker run --name "${NGINX_VERSION}"_test --rm \
|
docker run --name "${NGINX_VERSION}"_test --rm --link php \
|
||||||
-v "$LOCAL_DIR"/nginx.conf:/usr/local/nginx/conf/nginx.conf:ro \
|
-v "$LOCAL_DIR"/nginx.conf:/usr/local/nginx/conf/nginx.conf:ro \
|
||||||
-v "$LOCAL_DIR"/GeoLite2-Country.mmdb:/tmp/GeoLite2-Country.mmdb:ro \
|
-v "$LOCAL_DIR"/GeoLite2-Country.mmdb:/tmp/GeoLite2-Country.mmdb:ro \
|
||||||
-v "$TMP_DIR"/cert.pem:/tmp/cert.pem:ro \
|
-v "$TMP_DIR"/cert.pem:/tmp/cert.pem:ro \
|
||||||
@ -76,8 +83,14 @@ docker run --name "${NGINX_VERSION}"_requester --rm --link "${NGINX_VERSION}"_te
|
|||||||
exec_docker="docker exec -i ${NGINX_VERSION}_requester"
|
exec_docker="docker exec -i ${NGINX_VERSION}_requester"
|
||||||
$exec_docker apk add curl > /dev/null
|
$exec_docker apk add curl > /dev/null
|
||||||
|
|
||||||
## Test 1 status code by protocol
|
## Test 1-4 http/https/fastcgipass
|
||||||
for request in http://${NGINX_VERSION}_test/nginx_status https://${NGINX_VERSION}_test/nginx_status; do
|
requests="
|
||||||
|
http://${NGINX_VERSION}_test/nginx_status
|
||||||
|
https://${NGINX_VERSION}_test/nginx_status
|
||||||
|
http://${NGINX_VERSION}_test/phpfpm_status
|
||||||
|
https://${NGINX_VERSION}_test/phpfpm_status
|
||||||
|
"
|
||||||
|
for request in $requests; do
|
||||||
printf "\nRequesting %s\n" "$request"
|
printf "\nRequesting %s\n" "$request"
|
||||||
STATUS_CODE=$($exec_docker curl -s -k -m 5 -o /dev/null -w "%{http_code}" "$request")
|
STATUS_CODE=$($exec_docker curl -s -k -m 5 -o /dev/null -w "%{http_code}" "$request")
|
||||||
_check_status_code "$STATUS_CODE"
|
_check_status_code "$STATUS_CODE"
|
||||||
|
Loading…
Reference in New Issue
Block a user