Skip to content

Latest commit

 

History

History
74 lines (53 loc) · 3.8 KB

README.md

File metadata and controls

74 lines (53 loc) · 3.8 KB

Outrigger Apache PHP Base

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.

Features

Default VirtualHost

  • 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.

Optional Xdebug integration

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.

Environment Variables

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] PHP max_execution_time value.
  • PHP_MAX_CHILDREN: [5] Apache process manager pm.max_children value.
  • PHP_MEMORY_LIMIT: [256m] PHP memory_limit value.
  • PHP_OPCACHE_MEMORY: [192] PHP opcache.memory_consumption value.
  • PHP_POST_MAX_SIZE: [12M] PHP post_max_size value.
  • PHP_TIMEZONE: [UTC] PHP date.timezone value.
  • PHP_UPLOAD_MAX_FILESIZE: [10M] PHP upload_max_filesize value.
  • 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 the xhprof.output_dir directive 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] Apache ProxySet timeout value for the php-fpm proxy.
  • PHPFPM_START_SERVERS: [5] Start Servers The number of child processes created on startup.
  • PHPFPM_MIN_SPARE_SERVERS: [5] Min Spare Servers The desired minimum number of idle server processes.
  • PHPFPM_MAX_SPARE_SERVERS: [35] Max Spare Servers The desired maximum number of idle server processes.
  • PHPFPM_MAX_REQUESTS: [200] Max Request The number of requests each child process should execute before respawning.

Security Reports

Please email [email protected] with security concerns.

Maintainers

Phase2 Logo