Skip to content

Commit 5b79cd5

Browse files
Set default upload_max_filesize to 8 MB
Set the default upload_max_filesize to 8 MB in the php.ini. For this, a next environment variable can now be used to change this value.
1 parent 99db1e4 commit 5b79cd5

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎docker-entrypoint.sh‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ HTTPS_SERVER_NAME="${HTTPS_SERVER_NAME:-www.example.com}"
99
LOG_LEVEL="${LOG_LEVEL:-info}"
1010
TZ="${TZ:-UTC}"
1111
PHP_MEMORY_LIMIT="${PHP_MEMORY_LIMIT:-256M}"
12+
UPLOAD_MAX_FILESIZE="${UPLOAD_MAX_FILESIZE:-8M}"
1213

1314
echo 'Updating configurations'
1415

@@ -40,6 +41,7 @@ sed -i 's/#LoadModule\ expires_module/LoadModule\ expires_module/' /etc/apache2/
4041

4142
# Modify php memory limit and timezone
4243
sed -i "s/memory_limit = .*/memory_limit = ${PHP_MEMORY_LIMIT}/" /etc/php8/php.ini
44+
sed -i "s/upload_max_filesize = .*/upload_max_filesize = ${UPLOAD_MAX_FILESIZE}/" /etc/php8/php.ini
4345
sed -i "s#^;date.timezone =\$#date.timezone = \"${TZ}\"#" /etc/php8/php.ini
4446

4547
echo 'Running Apache'

0 commit comments

Comments
 (0)