webdevops/php plus Apache. Apache serves /app and passes PHP requests to PHP-FPM in the same container.
8.2, 8.3, 8.4, 8.5 (Debian 12), 8.6 (Debian 13) and 8.2-alpine, 8.3-alpine, 8.4-alpine, 8.5-alpine, 8.6-alpine, for both php-apache and php-apache-dev. For what is different in PHP 8.6, see PHP 8.6.
services:
app:
image: webdevops/php-apache:8.5
ports:
- "8080:80"
environment:
WEB_DOCUMENT_ROOT: /app/public
volumes:
- ./:/appPorts: 80 (HTTP) and 443 (HTTPS). HTTPS uses a self-signed certificate for *.vm that every build of the image creates anew, valid for ten years. To use your own certificate, see Configuration files.
Started by default: apache, php-fpm, cron, syslog. The -dev variant also starts postfix and ssh.
- Web server settings: Web server.
WEB_DOCUMENT_ROOT,WEB_DOCUMENT_INDEX,WEB_ALIAS_DOMAINandWEB_PHP_TIMEOUTapply to Apache. Apache's own index files (for exampleindex.htmland, on Debian,index.php) take precedence overWEB_DOCUMENT_INDEX. - PHP and PHP-FPM settings: see
webdevops/phpand Environment variables. - Scripts and hooks: Customization. Apache's hook directory is
/opt/docker/bin/service.d/httpd.d.
php-apache-dev is built on php-apache and changes the following:
- Xdebug is loaded by default, as in
php-dev;PHP_DEBUGGERswitches to Blackfire or turns both off. To connect your IDE, see Xdebug with an IDE. opcache.revalidate_freqis0.- Postfix and an SSH server are started. Postfix sends mail to real recipients unless you set a relay host, see Mail. As in
php-dev,rootandapplicationhave the passworddev, also for SSH. - Files matching
WEB_NO_CACHE_PATTERN(CSS, JavaScript, images, JSON, XML by default) are served withoutETag.