Skip to content

Commit 34a04f7

Browse files
author
Kevin Buchholz
committed
make the php memory limit configurable via environment variable
also set a sensible default of 512M
1 parent 1950af1 commit 34a04f7

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ FROM php:7.3.8-fpm-alpine3.10
33
ENV PHP_OPCACHE_VALIDATE_TIMESTAMPS="0" \
44
PHP_OPCACHE_MAX_ACCELERATED_FILES="10000" \
55
PHP_OPCACHE_MEMORY_CONSUMPTION="192" \
6-
PHP_OPCACHE_MAX_WASTED_PERCENTAGE="10"
6+
PHP_OPCACHE_MAX_WASTED_PERCENTAGE="10" \
7+
PHP_MEMORY_LIMIT="512M"
78

89
RUN apk info \
910
&& echo @edge http://nl.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories \

usr/local/etc/php/php.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
max_execution_time = 60
88
max_input_time = 60
9-
memory_limit = 512M
9+
memory_limit = ${PHP_MEMORY_LIMIT}
1010

1111
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1212
; Error handling and logging ;

0 commit comments

Comments
 (0)