diff --git a/Dockerfile b/Dockerfile index 2608033..f963e9c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,7 +39,7 @@ COPY --from=mlocati/php-extension-installer:2.2.19 /usr/bin/install-php-extensio # These are the extensions we depend on: # $ composer check -f json 2>/dev/null | jq '.[] | select(.name | startswith("ext-")) | .name | sub("ext-"; "")' -r # Currently, this seems to only be pdo_mysql. -RUN install-php-extensions pdo_mysql +RUN install-php-extensions pdo_mysql opcache # Install composer COPY --from=docker.io/library/composer:latest /usr/bin/composer /usr/bin/composer diff --git a/README.md b/README.md index efcef99..a036b65 100755 --- a/README.md +++ b/README.md @@ -44,5 +44,10 @@ After recreating the docker container, remember to run the migration to make sur docker exec -it --user www-data events php artisan migrate ``` +## Caching +This application uses the OPCache to cache the compiled PHP code. Default setting is for production which means that the cache is not cleared automatically. To clear the cache, you need to restart the container if you change a file. + +For development, change `validate_timestamps` to `1` in the `/usr/local/etc/php/php.ini` file to make sure that the cache is cleared automatically when a file is changed. + ## Contribution and conventions Contributions are much appreciated to help everyone move this service forward with fixes and functionalities. We recommend you to fork this repository here on GitHub so you can easily create pull requests back to the main project. \ No newline at end of file diff --git a/config/app.php b/config/app.php index bbbce85..772a42a 100755 --- a/config/app.php +++ b/config/app.php @@ -27,7 +27,7 @@ | Needs to be updated manually for each iteration we do. | */ - 'version' => '1.0.5', + 'version' => '1.0.6', /* |-------------------------------------------------------------------------- diff --git a/container/configs/php.ini b/container/configs/php.ini index 1fda6ba..b76c951 100644 --- a/container/configs/php.ini +++ b/container/configs/php.ini @@ -1766,23 +1766,23 @@ ldap.max_links = -1 [opcache] ; Determines if Zend OPCache is enabled -;opcache.enable=1 +opcache.enable=1 ; Determines if Zend OPCache is enabled for the CLI version of PHP -;opcache.enable_cli=0 +opcache.enable_cli=1 ; The OPcache shared memory storage size. -;opcache.memory_consumption=128 +opcache.memory_consumption=64 ; The amount of memory for interned strings in Mbytes. -;opcache.interned_strings_buffer=8 +opcache.interned_strings_buffer=4 ; The maximum number of keys (scripts) in the OPcache hash table. ; Only numbers between 200 and 1000000 are allowed. -;opcache.max_accelerated_files=10000 +opcache.max_accelerated_files=8000 ; The maximum percentage of "wasted" memory until a restart is scheduled. -;opcache.max_wasted_percentage=5 +opcache.max_wasted_percentage=5 ; When this directive is enabled, the OPcache appends the current working ; directory to the script key, thus eliminating possible collisions between @@ -1792,12 +1792,12 @@ ldap.max_links = -1 ; 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=0 ; How often (in seconds) to check file timestamps for changes to the shared ; memory storage allocation. ("1" means validate once per second, but only ; once per request. "0" means always validate) -;opcache.revalidate_freq=2 +opcache.revalidate_freq=1 ; Enables or disables file search in include_path optimization ;opcache.revalidate_path=0 @@ -1868,7 +1868,7 @@ ldap.max_links = -1 ; Enables and sets the second level cache directory. ; It should improve performance when SHM memory is full, at server restart or ; SHM reset. The default "" disables file based caching. -;opcache.file_cache= +opcache.file_cache=/tmp ; Enables or disables opcode caching in shared memory. ;opcache.file_cache_only=0 @@ -1908,7 +1908,7 @@ ldap.max_links = -1 ; Prevents caching files that are less than this number of seconds old. It ; protects from caching of incompletely updated files. In case all file updates ; on your site are atomic, you may increase performance by setting it to "0". -;opcache.file_update_protection=2 +opcache.file_update_protection=2 ; Absolute path used to store shared lockfiles (for *nix only). ;opcache.lockfile_path=/tmp