Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose opcache.validate_timestamps to Environment #510

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ We like to customize our images on a per app basis using environment variables.
`PHP_OPCACHE_MAX_ACCELERATED_FILES`<br />*Default: "10000"*|The maximum number of keys (scripts) in the OPcache hash table. (<a target="_blank" href="https://www.php.net/manual/en/opcache.configuration.php#ini.opcache.max-accelerated-files">Official docs</a>)|all
`PHP_OPCACHE_MEMORY_CONSUMPTION`<br />*Default: "128"*|The amount of memory used by the OPcache engine, in megabytes. (<a target="_blank" href="https://www.php.net/manual/en/opcache.configuration.php#ini.opcache.memory-consumption">Official docs</a>)|all
`PHP_OPCACHE_REVALIDATE_FREQ`<br />*Default: "2"*|How often the OPcache checks for updates to cached files (in seconds). (<a target="_blank" href="https://www.php.net/manual/en/opcache.configuration.php#ini.opcache.revalidate-freq">Official docs</a>)|all
`PHP_OPCACHE_VALIDATE_TIMESTAMPS`<br />*Default: "1"*|Whether OPcache checks for changes to files, or requires reload of PHP to revalidate OPcache. (<a target="_blank" href="https://www.php.net/manual/en/opcache.configuration.php#ini.opcache.validate-timestamps">Official docs</a>)|all
`PHP_OPEN_BASEDIR`<br />*Default: "None"* |Limit the files that can be accessed by PHP to the specified directory-tree, including the file itself. `open_basedir` is just an extra safety net, that is in no way comprehensive, and can therefore not be relied upon when security is needed. (<a target="_blank" href="https://www.php.net/manual/en/ini.core.php#ini.open-basedir">Official docs</a>)| all
`PHP_POST_MAX_SIZE`<br />*Default: "100M"*|Sets max size of post data allowed. (<a target="_blank" href="https://www.php.net/manual/en/ini.core.php#ini.post-max-size">Official docs</a>)|all
`PHP_SESSION_COOKIE_SECURE`<br />*Default: 1 (true)*|Specifies whether cookies should only be sent over secure connections. (<a target="_blank" href="https://www.php.net/manual/en/session.configuration.php#ini.session.cookie-secure">Official docs</a>)|all
Expand All @@ -77,4 +78,4 @@ We like to customize our images on a per app basis using environment variables.
`UNIT_PROCESSES_MAX`<br />*Default: "20"*|The maximum number of application processes that can be started. (<a target="_blank" href="https://unit.nginx.org/configuration/#application-processes">Official Docs</a>)| unit
`UNIT_PROCESSES_SPARE`<br />*Default: "2"*|Minimum number of idle processes that Unit tries to maintain for an app. (<a target="_blank" href="https://unit.nginx.org/configuration/#application-processes">Official Docs</a>)| unit
`UNIT_WEBROOT`<br />*Default: "/var/www/html/public"*|Base directory of the app’s file structure. All URI paths are relative to it. (<a target="_blank" href="https://unit.nginx.org/configuration/#php">Official Docs</a>)| unit
`UNIT_MAX_BODY_SIZE`<br />*Default: "104857600"* (100MB) | Sets maximum number of bytes in the body of a client’s request. (<a target="_blank" href="https://unit.nginx.org/configuration/#settings:~:text=false%20(disabled).-,max_body_size,-Maximum%20number%20of">Official docs</a>) | unit
`UNIT_MAX_BODY_SIZE`<br />*Default: "104857600"* (100MB) | Sets maximum number of bytes in the body of a client’s request. (<a target="_blank" href="https://unit.nginx.org/configuration/#settings:~:text=false%20(disabled).-,max_body_size,-Maximum%20number%20of">Official docs</a>) | unit
Original file line number Diff line number Diff line change
Expand Up @@ -1810,7 +1810,7 @@ opcache.max_accelerated_files=${PHP_OPCACHE_MAX_ACCELERATED_FILES}

; When disabled, you must reset the OPcache manually or restart the
; webserver for changes to the filesystem to take effect.
;opcache.validate_timestamps=1
opcache.validate_timestamps=${PHP_OPCACHE_VALIDATE_TIMESTAMPS}

; How often (in seconds) to check file timestamps for changes to the shared
; memory storage allocation. ("1" means validate once per second, but only
Expand Down Expand Up @@ -1972,4 +1972,4 @@ opcache.revalidate_freq=${PHP_OPCACHE_REVALIDATE_FREQ}
;ffi.enable=preload

; List of headers files to preload, wildcard patterns allowed.
;ffi.preload=
;ffi.preload=
1 change: 1 addition & 0 deletions src/variations/cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ ENV APP_BASE_DIR=/var/www/html \
PHP_OPCACHE_MAX_ACCELERATED_FILES="10000" \
PHP_OPCACHE_MEMORY_CONSUMPTION="128" \
PHP_OPCACHE_REVALIDATE_FREQ="2" \
PHP_OPCACHE_VALIDATE_TIMESTAMPS="1" \
PHP_OPEN_BASEDIR="" \
PHP_POST_MAX_SIZE="100M" \
PHP_SESSION_COOKIE_SECURE=false \
Expand Down
1 change: 1 addition & 0 deletions src/variations/fpm-apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ ENV APACHE_DOCUMENT_ROOT=/var/www/html/public \
PHP_OPCACHE_MAX_ACCELERATED_FILES="10000" \
PHP_OPCACHE_MEMORY_CONSUMPTION="128" \
PHP_OPCACHE_REVALIDATE_FREQ="2" \
PHP_OPCACHE_VALIDATE_TIMESTAMPS="1" \
PHP_OPEN_BASEDIR="" \
PHP_POST_MAX_SIZE="100M" \
PHP_SESSION_COOKIE_SECURE=false \
Expand Down
1 change: 1 addition & 0 deletions src/variations/fpm-nginx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ ENV APP_BASE_DIR=/var/www/html \
PHP_OPCACHE_MAX_ACCELERATED_FILES="10000" \
PHP_OPCACHE_MEMORY_CONSUMPTION="128" \
PHP_OPCACHE_REVALIDATE_FREQ="2" \
PHP_OPCACHE_VALIDATE_TIMESTAMPS="1" \
PHP_OPEN_BASEDIR="" \
PHP_POST_MAX_SIZE="100M" \
PHP_SESSION_COOKIE_SECURE=false \
Expand Down
1 change: 1 addition & 0 deletions src/variations/fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ ENV APP_BASE_DIR=/var/www/html \
PHP_OPCACHE_MAX_ACCELERATED_FILES="10000" \
PHP_OPCACHE_MEMORY_CONSUMPTION="128" \
PHP_OPCACHE_REVALIDATE_FREQ="2" \
PHP_OPCACHE_VALIDATE_TIMESTAMPS="1" \
PHP_OPEN_BASEDIR="" \
PHP_POST_MAX_SIZE="100M" \
PHP_SESSION_COOKIE_SECURE=Off \
Expand Down
1 change: 1 addition & 0 deletions src/variations/unit/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ ENV APP_BASE_DIR=/var/www/html \
PHP_OPCACHE_MAX_ACCELERATED_FILES="10000" \
PHP_OPCACHE_MEMORY_CONSUMPTION="128" \
PHP_OPCACHE_REVALIDATE_FREQ="2" \
PHP_OPCACHE_VALIDATE_TIMESTAMPS="1" \
PHP_OPEN_BASEDIR="" \
PHP_POST_MAX_SIZE="100M" \
PHP_SESSION_COOKIE_SECURE=false \
Expand Down