Abstract base image for a PHP application server for Apache w/ PHP-FPM
A base image for outrigger/docker-apache-php. Includes Apache and default VirtualHost configured with php-fpm proxy. Based on outrigger/servicebase
Does not include the PHP runtime. Extends this to add your own, or use outrigger/apache-php.
For more documentation on how Outrigger images are constructed and how to work with them, please see the documentation.
- Socket: 0.0.0.0:80
- Server Name: localhost
- PHP-FPM proxy: fcgi://localhost:9001
- Docroot: /var/www/html (configurable, see below)
Apache error and access logs are written to /var/log/httpd.
By choosing to set the PHP_XDEBUG environment variable to "true", you may
enable Xdebug support. For details of the Xdebug configuration see the
configuration template.
The specific Xdebug settings are not configurable without overriding the Xdebug template but should serve most use cases.
For more on using Xdebug with PHPStorm, see the detailed Outrigger tutorial.
Outrigger images use Environment Variables and confd to "templatize" a number of Docker environment configurations. These templates are processed on startup with environment variables passed in via the docker run command-line or via your docker-compose manifest file. Here are the "tunable" configurations offered by this image.
DOCROOT: [/var/www/html] Apache document root.PHP_MAX_EXECUTION_TIME: [60] PHPmax_execution_timevalue.PHP_MAX_CHILDREN: [5] Apache process managerpm.max_childrenvalue.PHP_MEMORY_LIMIT: [256m] PHPmemory_limitvalue.PHP_OPCACHE_MEMORY: [192] PHPopcache.memory_consumptionvalue.PHP_POST_MAX_SIZE: [12M] PHPpost_max_sizevalue.PHP_TIMEZONE: [UTC] PHPdate.timezonevalue.PHP_UPLOAD_MAX_FILESIZE: [10M] PHPupload_max_filesizevalue.PHP_XDEBUG: ["false"|"true"] A string literal to enable PHP Xdebug. Defaults to"false".PHP_XHPROF: ["false"|"true"] A string literal to enable PHP xhprof. Sets thexhprof.output_dirdirective to /tmp when enabled. Only usable on PHP versions less than PHP 7. Defaults to"false".PHP_YAML: ["false"|"true"] A string literal to enable PHP YAML extension. Defaults to"false".PROXY_TIMEOUT: [120] ApacheProxySet timeoutvalue for the php-fpm proxy.PHPFPM_START_SERVERS: [5]Start ServersThe number of child processes created on startup.PHPFPM_MIN_SPARE_SERVERS: [5]Min Spare ServersThe desired minimum number of idle server processes.PHPFPM_MAX_SPARE_SERVERS: [35]Max Spare ServersThe desired maximum number of idle server processes.PHPFPM_MAX_REQUESTS: [200]Max RequestThe number of requests each child process should execute before respawning.
Please email outrigger@phase2technology.com with security concerns.
