Skip to content

Commit 9bb03ea

Browse files
committed
Fix bugs and defaults
1 parent 9381b46 commit 9bb03ea

File tree

5 files changed

+18
-8
lines changed

5 files changed

+18
-8
lines changed

core/files/entrypoint.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ export PHP_UPLOAD_MAX_FILESIZE=${PHP_UPLOAD_MAX_FILESIZE:-50M}
5151
export PHP_POST_MAX_SIZE=${PHP_POST_MAX_SIZE:-50M}
5252
export PHP_MAX_INPUT_TIME=${PHP_MAX_INPUT_TIME:-300}
5353

54+
export PHP_FCGI_CHILDREN=${PHP_FCGI_CHILDREN:-5}
55+
export PHP_FCGI_START_SERVERS=${PHP_FCGI_START_SERVERS:-2}
56+
export PHP_FCGI_SPARE_SERVERS=${PHP_FCGI_SPARE_SERVERS:-1}
57+
export PHP_FCGI_MAX_REQUESTS=${PHP_FCGI_MAX_REQUESTS:-0}
58+
5459
export PHP_SESSION_TIMEOUT=${PHP_SESSION_TIMEOUT:-60}
5560
export PHP_SESSION_COOKIE_TIMEOUT=${PHP_SESSION_COOKIE_TIMEOUT:-10080}
5661
export PHP_SESSION_DEFAULTS=${PHP_SESSION_DEFAULTS:-php}

core/files/entrypoint_nginx.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ init_nginx() {
343343
if [[ "$FASTCGI_STATUS_LISTEN" != "" ]]; then
344344
echo "... enabling php-fpm status page"
345345
ln -s /etc/nginx/sites-available/php-fpm-status /etc/nginx/sites-enabled/php-fpm-status
346-
sed -i -E "s/ listen [^;]+/ listen $FASTCGI_STATUS_LISTEN" /etc/nginx/sites-enabled/php-fpm-status
346+
sed -i -E "s/ listen [^;]+/ listen $FASTCGI_STATUS_LISTEN/" /etc/nginx/sites-enabled/php-fpm-status
347347
elif [[ -f /etc/nginx/sites-enabled/php-fpm-status ]]; then
348348
echo "... disabling php-fpm status page"
349349
rm /etc/nginx/sites-enabled/php-fpm-status

core/files/etc/nginx/sites-available/php-fpm-status

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ server {
55
include fastcgi_params;
66
fastcgi_pass unix:/run/php/php-fpm-status.sock;
77
}
8-
}
8+
}

docker-compose.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,18 @@ services:
194194
- "FASTCGI_READ_TIMEOUT=${FASTCGI_READ_TIMEOUT:-300s}"
195195
- "FASTCGI_SEND_TIMEOUT=${FASTCGI_SEND_TIMEOUT:-300s}"
196196
- "FASTCGI_CONNECT_TIMEOUT=${FASTCGI_CONNECT_TIMEOUT:-300s}"
197+
- "FASTCGI_STATUS_LISTEN=${FASTCGI_STATUS_LISTEN}"
197198
# PHP settings
198199
- "PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT:-2048M}"
199200
- "PHP_MAX_EXECUTION_TIME=${PHP_MAX_EXECUTION_TIME:-300}"
200201
- "PHP_UPLOAD_MAX_FILESIZE=${PHP_UPLOAD_MAX_FILESIZE:-50M}"
201202
- "PHP_POST_MAX_SIZE=${PHP_POST_MAX_SIZE:-50M}"
202203
- "PHP_MAX_INPUT_TIME:${PHP_MAX_INPUT_TIME:-300}"
204+
# PHP FPM pool setup
205+
- "PHP_FCGI_CHILDREN=${PHP_FCGI_CHILDREN:-5}"
206+
- "PHP_FCGI_START_SERVERS=${PHP_FCGI_START_SERVERS:-2}"
207+
- "PHP_FCGI_SPARE_SERVERS=${PHP_FCGI_SPARE_SERVERS:-1}"
208+
- "PHP_FCGI_MAX_REQUESTS=${PHP_FCGI_MAX_REQUESTS:-0}"
203209
# Additional PHP settings
204210
- "PHP_SESSION_TIMEOUT=${PHP_SESSION_TIMEOUT:-60}"
205211
- "PHP_SESSION_COOKIE_TIMEOUT=${PHP_SESSION_COOKIE_TIMEOUT:-10080}"

template.env

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ SYNCSERVERS_1_PULL_RULES=
183183
# FASTCGI_READ_TIMEOUT=300s
184184
# FASTCGI_SEND_TIMEOUT=300s
185185
# FASTCGI_CONNECT_TIMEOUT=300s
186-
# Whete to listen to PHP-FPM status. Can be a port or a ip:port. If not set the status page will not be shown.
186+
# Where to listen to PHP-FPM status. Can be a port or a ip:port. If not set the status page will not be shown.
187187
# Do not expose this page in public networks.
188188
# FASTCGI_STATUS_LISTEN=""
189189

@@ -203,14 +203,13 @@ SYNCSERVERS_1_PULL_RULES=
203203

204204
## PHP FPM pool setup
205205
# Maximum number of php-fpm processes, limits the number of simultaneous requests.
206-
PHP_FCGI_CHILDREN="5"
206+
# PHP_FCGI_CHILDREN=5
207207
# Number of processes created on startup.
208-
PHP_FCGI_START_SERVERS="2"
208+
# PHP_FCGI_START_SERVERS=2
209209
# The desired number of idle server processes.
210-
PHP_FCGI_SPARE_SERVERS="1"
210+
# PHP_FCGI_SPARE_SERVERS=1
211211
# The number of requests each process should execute before respawning. "0" means endless request processing.
212-
PHP_FCGI_MAX_REQUESTS="0"
213-
212+
# PHP_FCGI_MAX_REQUESTS=0
214213

215214
## Additional PHP settings
216215
# Timeout (in minutes) for user session inactivity before it expires.

0 commit comments

Comments
 (0)