Skip to content

yii2-extensions/docker-images

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yii Framework

Docker images


Production-ready Docker images for Yii2 applications with Apache, PHP-FPM, and HTTP/2 support.

Features

  • 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, and full

Quick Start

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

Docker Compose

Create 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=1

Build Variants

Development (dev)

docker 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.4 with Xdebug, Memcached, MongoDB, SOAP, YAML

Production (prod)

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

Full Testing (full)

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

Package information

Docker Build GitHub Release

Quality code

Super-Linter

Our social networks

Follow on X

License

License