Files
docker-php-fpm/doc/docker-env-variables.md
2022-12-10 18:43:56 +01:00

5.3 KiB

Permissions | Tags | Architectures | Versions | Flavours | Extensions | Tools | Env Vars | Volumes | Base Images


Documentation

Environment Variables

Have a look at the following table to see all supported environment variables for each Docker image flavour.

Image Env Variable Type Default Description
base

mods

prod

slim

work
DEBUG_ENTRYPOINT int 0 Set debug level for startup.
0 Only warnings and errors are shown.
1 All log messages are shown
2 All log messages and executed commands are shown.
NEW_UID int 1000 Assign the PHP-FPM user a new uid in order to syncronize file system permissions with your host computer and the Docker container. You should use a value that matches your host systems local user.
(Type id -u for your uid).
NEW_GID int 1000 Assign the PHP-FPM group a new gid in order to syncronize file system permissions with your host computer and the Docker container. You should use a value that matches your host systems local group.
(Type id -g for your gid).
prod

slim

work
TIMEZONE string UTC Set docker OS timezone as well as PHP timezone.
(Example: Europe/Berlin)
DOCKER_LOGS bool 1 By default all Docker images are configured to output their PHP-FPM access and error logs to stdout and stderr. Those which support it can change the behaviour to log into files inside the container. Their respective directories are available as volumes that can be mounted to the host computer. This feature might help developer who are more comfortable with tailing or searching through actual files instead of using docker logs.

Set this variable to 0 in order to enable logging to files. Log files are avilable under /var/log/php/ which is also a docker volume that can be mounted locally.
ENABLE_MODULES string '' Comma separated list of PHP modules to enable, which are not enabled by default.
Example:
ENABLE_MODULES=blackfire, ioncube, psr, phalcon
DISABLE_MODULES string '' Comma separated list of PHP modules to disable.
Example:
DISABLE_MODULES=swoole,imagick
ENABLE_MAIL bool 0 Start local postfix with or without email catch-all.
0: Postfix service disabled.
1: Postfix service started normally.
2: Postfix service started configured for local delivery and all mails sent (even to real domains) will be catched locally. No email will ever go out. They will all be stored in a local devilbox account.
Value: 0, 1 or 2
FORWARD_PORTS_TO_LOCALHOST string List of remote ports to forward to 127.0.0.1.
Format:
<local-port>:<remote-host>:<remote-port>
You can separate multiple entries by comma.
Example:
3306:mysqlhost:3306, 6379:192.0.1.1:6379
slim

work
MYSQL_BACKUP_USER string '' Username for mysql backups used for bundled mysqldump-secure
MYSQL_BACKUP_PASS string '' Password for mysql backups used for bundled mysqldump-secure
MYSQL_BACKUP_HOST string '' Hostname for mysql backups used for bundled mysqldump-secure