Sign inSign up

islandora/nginx

Sponsored OSS

By islandora

•Updated about 18 hours ago

HTTP and reverse proxy server.

Image
Security
Web servers
Content management system
0

100K+

islandora/nginx repository overview

⁠Nginx

Docker image for Nginx⁠ and source-built PHP 8.4 FPM⁠.

Built from Islandora-DevOps/isle-buildkit nginx⁠

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_REAL_IP_RECURSIVEoffSee https://nginx.org/en/docs/http/ngx_http_realip_module.html⁠
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_SET_REAL_IP_FROM2172.0.0.0/8Trusted addresses that are known to send correct replacement addresses
NGINX_SET_REAL_IP_FROM3172.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_PMdynamicstatic, dynamic, or ondemand
PHP_PM_MAX_CHILDREN5The number of simultaneous requests that will be served
PHP_PM_START_SERVERS2The number of child processes created on startup
PHP_PM_MIN_SPARE_SERVERS1The desired minimum number of idle server processes (dynamic only)
PHP_PM_MAX_SPARE_SERVERS3The desired maximum number of idle server processes (dynamic only)
PHP_PM_IDLE_TIMEOUT10sThe number of seconds after which an idle process will be killed (ondemand only)
PHP_PM_MAX_REQUESTS0The number of requests each child process should execute before respawning
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}"

⁠Building PHP from source

Dockerfile builds PHP 8.4 from the vendored Alpine aport in build/, then installs the signed local APKs into the runtime image. It does not wait for Alpine's PHP binary packages. The aport retains Alpine's patches, extension packages, configuration paths, and upstream test suite. Its build dependencies exclude the prebuilt PHP runtime.

Build with make build TARGET=nginx. The php-build stage is independent of Composer, runtime package pins, and rootfs, so Docker reuses the compiled PHP layer when those change. PHP/aport or pinned Alpine base changes invalidate it. CI already imports the nginx registry cache separately for amd64 and arm64 and exports intermediate layers on main (mode=max in docker-bake.hcl).

Renovate tracks stable PHP 8.4 tags directly from php/php-src and runs ci/update-php.sh to update the aport checksum and runtime version together. These updates bypass the weekly dependency grouping. The current Renovate job checks daily; it can also be dispatched manually for urgent releases. To update immediately, run bash ci/update-php.sh 8.4.27 with the desired 8.4 patch version. The script verifies the archive against PHP.net's published SHA-256 before writing its SHA-512 into the aport. An upgrade remains subject to the normal build and test pipeline.

The aport was vendored from Alpine aports commit b42029ecc52c7679bbda71bb09830f6813648c31 on 3.24-stable. When refreshing Alpine patches or changing the Alpine base, review the upstream aport as well.

Tag summary

Content type

Image

Digest

sha256:2734d6de1…

Size

79.9 MB

Last updated

about 18 hours ago

docker pull islandora/nginx:renovate.all-non-major-dependencies

This week's pulls

Pulls:

1,199

Last week