Sign inSign up

borndigital/nginx

By borndigital

•Updated over 1 year ago

Image
0

1.5K

borndigital/nginx repository overview

⁠Nginx

Docker image for Nginx⁠ version 1.22.1 and FPM⁠ version 8.1.15.

Please refer to the Nginx Documentation⁠ and FPM Documentation⁠ for more in-depth information.

Acts as base Docker image for all PHP based services, such as nginx, Docker etc. It can be used on it's own as well.

⁠Dependencies

Requires islandora/base docker image to build. Please refer to the Base Image README⁠ for additional information.

⁠Settings

N.B. For all of the settings below images that descend from islandora/nginx will apply prefix to every setting. So for example PHP_LOG_LEVEL would become HOUDINI_PHP_LOG_LEVEL this is to allow for different settings on a per-service basis.

⁠Nginx Settings
Environment VariableDefaultDescription
NGINX_CLIENT_BODY_TIMEOUT60sTimeout for reading client request body
NGINX_CLIENT_MAX_BODY_SIZE1mSpecifies the maximum accepted body size of a client request
NGINX_ERROR_LOG_LEVELwarnLog Level of Error log
NGINX_FASTCGI_CONNECT_TIMEOUT60sTimeout for establishing a connection with a FastCGI server
NGINX_FASTCGI_READ_TIMEOUT60sTimeout for reading a response from the FastCGI server
NGINX_FASTCGI_SEND_TIMEOUT60sTimeout for transmitting a request to the FastCGI server.
NGINX_KEEPALIVE_TIMEOUT75sTimeout for keep-alive connections
NGINX_LINGERING_TIMEOUT5sThe maximum waiting time for more client data to arrive
NGINX_PROXY_CONNECT_TIMEOUT60sTimeout for establishing a connection with a proxied server
NGINX_PROXY_READ_TIMEOUT60sTimeout for reading a response from the proxied server
NGINX_PROXY_SEND_TIMEOUT60sTimeout for transmitting a request to the proxied server
NGINX_REAL_IP_HEADERX-Forwarded-ForRequest header field whose value will be used to replace the client address.
NGINX_SEND_TIMEOUT60sTimeout for transmitting a response to the client
NGINX_SET_REAL_IP_FROM172.0.0.0/8Trusted addresses that are known to send correct replacement addresses
NGINX_WORKER_CONNECTIONS1024The maximum number of simultaneous connections that can be opened by a worker process
NGINX_WORKER_PROCESSESautoSet number of worker processes automatically based on number of CPU cores
⁠PHP Settings
Environment VariableDefaultDescription
PHP_DEFAULT_SOCKET_TIMEOUT60Default timeout for socket based streams (seconds)
PHP_LOG_LEVELnoticeLog level. Possible Values: alert, error, warning, notice, debug
PHP_LOG_LIMIT16384Log limit on number of characters in the single line
PHP_MAX_EXECUTION_TIME30Maximum execution time of each script, in seconds
PHP_MAX_FILE_UPLOADS20Maximum number of files that can be uploaded via a single request
PHP_MAX_INPUT_TIME60Maximum amount of time each script may spend parsing request data
PHP_MEMORY_LIMIT128MMaximum amount of memory a script may consume
PHP_POST_MAX_SIZE128MMaximum size of POST data that PHP will accept
PHP_PROCESS_CONTROL_TIMEOUT60Timeout for child processes to wait for a reaction on signals from master
PHP_REQUEST_TERMINATE_TIMEOUT60Timeout for serving a single request after which the worker process will be killed
PHP_UPLOAD_MAX_FILESIZE128MMaximum allowed size for uploaded files

⁠Updating

You can change the release used for composer by modifying the build argument COMPOSER_VERSION and COMPOSER_SHA256 in the Dockerfile shown as XXXXXXXXXXXX in the following snippet:

ARG COMPOSER_VERSION=XXXXXXXXXXXX
#...
ARG COMPOSER_SHA256=XXXXXXXXXXXX

You can generate the SHA256 with the following commands:

COMPOSER_VERSION=$(cat nginx/Dockerfile | grep -o 'COMPOSER_VERSION=.*' | cut -f2 -d=)
COMPOSER_FILE=$(cat nginx/Dockerfile | grep -o 'COMPOSER_FILE=.*' | cut -f2 -d=)
COMPOSER_URL=$(cat nginx/Dockerfile | grep -o 'COMPOSER_URL=.*' | cut -f2 -d=)
FILE=$(eval "echo $COMPOSER_FILE")
URL=$(eval "echo $COMPOSER_URL")
wget --quiet "${URL}"
shasum -a 256 "${FILE}" | cut -f1 -d' '
rm "${FILE}"

Tag summary

Content type

Image

Digest

sha256:f89b4739d…

Size

82.3 MB

Last updated

over 1 year ago

docker pull borndigital/nginx:matomo-upgrade-532