chaunceyt / docker-apache-php-base

Abstract base image for a PHP application server for Apache w/ PHP-FPM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

Security Reports

Please email outrigger@phase2technology.com with security concerns.

Maintainers

Phase2 Logo

About

Abstract base image for a PHP application server for Apache w/ PHP-FPM


Languages

Language:Shell 76.4%Language:PHP 23.6%