Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ linux/s390x
* `MEMORY_LIMIT`: PHP memory limit (default `512M`)
* `UPLOAD_MAX_SIZE`: Upload max size (default `512M`)
* `PM_MAX_CHILDREN`: Maximum number of child processes to be created for PHP-FPM (default `20`)
* `NGINX_WORKER_PROCESSES`: Number of Nginx worker processes (default `auto`)
* `BODY_TIMEOUT`: Defines a timeout for reading client request body (default `300s`)
* `CLEAR_ENV`: Clear environment in FPM workers (default `yes`)
* `OPCACHE_MEM_SIZE`: PHP OpCache memory consumption (default `128`)
Expand Down
2 changes: 2 additions & 0 deletions rootfs/etc/cont-init.d/03-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ TZ=${TZ:-UTC}
MEMORY_LIMIT=${MEMORY_LIMIT:-512M}
UPLOAD_MAX_SIZE=${UPLOAD_MAX_SIZE:-512M}
PM_MAX_CHILDREN=${PM_MAX_CHILDREN:-20}
NGINX_WORKER_PROCESSES=${NGINX_WORKER_PROCESSES:-auto}
BODY_TIMEOUT=${BODY_TIMEOUT:-300s}
CLEAR_ENV=${CLEAR_ENV:-yes}
OPCACHE_MEM_SIZE=${OPCACHE_MEM_SIZE:-128}
Expand Down Expand Up @@ -116,6 +117,7 @@ sed -e "s/@MEMORY_LIMIT@/$MEMORY_LIMIT/g" \
# Nginx
echo "Setting Nginx configuration..."
sed -e "s/@UPLOAD_MAX_SIZE@/$UPLOAD_MAX_SIZE/g" \
-e "s/@NGINX_WORKER_PROCESSES@/$NGINX_WORKER_PROCESSES/g" \
-e "s/@BODY_TIMEOUT@/$BODY_TIMEOUT/g" \
-e "s#@REAL_IP_FROM@#$REAL_IP_FROM#g" \
-e "s#@REAL_IP_HEADER@#$REAL_IP_HEADER#g" \
Expand Down
2 changes: 1 addition & 1 deletion rootfs/tpls/etc/nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# similar to https://github.com/nextcloud/docker/blob/master/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/web/nginx.conf

pid /var/run/nginx/nginx.pid;
worker_processes auto;
worker_processes @NGINX_WORKER_PROCESSES@;
error_log /proc/self/fd/2 info;

events {
Expand Down