This developer needed to turn back the clock in the PHP-FPM container, you will not believe what he did next! (#1675)

* Added documentation for installing libfaketime in the php-fpm container
* Enabled installing and using libfaketime system-wide inside the php-fpm container
This commit is contained in:
Youri Westerman
2018-08-21 12:41:34 +07:00
committed by Shao Yu-Lung (Allen)
parent 1b865dd153
commit 89051de67d
4 changed files with 45 additions and 0 deletions

View File

@ -1499,10 +1499,33 @@ e) set it to `true`
3 - Set it to `true`
<br>
4 - Re-build the containers `docker-compose build php-fpm`
<br>
<br>
<a name="Install-Faketime"></a>
## Install libfaketime in the php-fpm container
Libfaketime allows you to control the date and time that is returned from the operating system.
It can be used by specifying a special string in the `PHP_FPM_FAKETIME` variable in the `.env` file.
For example:
`PHP_FPM_FAKETIME=-1d`
will set the clock back 1 day. See (https://github.com/wolfcw/libfaketime) for more information.
1 - Open the `.env` file
<br>
2 - Search for the `PHP_FPM_INSTALL_FAKETIME` argument under the PHP-FPM container
<br>
3 - Set it to `true`
<br>
4 - Search for the `PHP_FPM_FAKETIME` argument under the PHP-FPM container
<br>
5 - Set it to the desired string
<br>
6 - Re-build the containers `docker-compose build php-fpm`<br>
<br>
<a name="phpstorm-debugging"></a>