Production-ready Docker images for Yii2 applications with Apache, PHP-FPM, and HTTP/2 support.
- ✅ Apache 2.4 with HTTP/2, Brotli compression, and SSL/TLS
- ✅ Auto SSL certificate generation for development
- ✅ Health checks and monitoring endpoints
- ✅ PHP 8.4 with FPM and essential extensions (Redis, MongoDB, MySQL, PostgreSQL)
- ✅ Security hardened with modern configurations
- ✅ Supervisor for process management
- ✅ Three build variants: dev,prod, andfull
Pull and run the image.
# Development build with Xdebug
docker run -d -p 8080:80 -v $(pwd):/var/www/app ghcr.io/yii2-extensions/apache:8.4-debian-dev-v1.0.0
# Production build with optimizations
docker run -d -p 80:80 -p 443:443 -v $(pwd):/var/www/app ghcr.io/yii2-extensions/apache:8.4-debian-prod-v1.0.0
# Full testing build with all extensions
docker run -d -p 8080:80 -v $(pwd):/var/www/app ghcr.io/yii2-extensions/apache:8.4-debian-full-v1.0.0Create a docker-compose.yml file.
version: '3.8'
services:
  web:
    image: ghcr.io/yii2-extensions/apache:8.4-debian-dev-v1.0.0
    ports:
      - "8080:80"
      - "8443:443"
    volumes:
      - .:/var/www/app
    environment:
      - YII_ENV=dev
      - YII_DEBUG=1docker pull ghcr.io/yii2-extensions/apache:8.4-debian-dev-v1.0.0- Error reporting enabled with detailed logging
- Node.js integration for asset compilation
- OPcache with revalidation for development workflow
- PHP 8.4with Xdebug, Memcached, MongoDB, SOAP, YAML
docker pull ghcr.io/yii2-extensions/apache:8.4-debian-prod-v1.0.0- Minimal extension set with maximum performance
- OPcache optimizations with disabled timestamp validation
- Optimized for container orchestration platforms
- Security hardening with reduced attack surface
docker pull ghcr.io/yii2-extensions/apache:8.4-debian-full-v1.0.0- All development extensions plus OCI8, SQL Server, Tidy
- Complete extension matrix for comprehensive testing
- Microsoft SQL Server ODBC drivers and PDO support
- Production-like optimizations with development tools