Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
- Bug #186: Rename steps for clarity in GitHub Actions workflow `build.yml` (@terabytesoftw)
- Bug #188: Update `README.md` to include `FrankenPHP` badge for classic web server setup (@terabytesoftw)
- Bug #190: Simplify Docker workflow by removing unnecessary steps and adding healthcheck configuration (@terabytesoftw)
- Enh #192: Use pre-built Docker image for Yii2 with Apache + PHP-FPM Debian Trixie `ghcr.io/yii2-extensions/apache:8.4-debian-dev-v1.0.0` (@terabytesoftw)

## 0.1.0 August 31, 2025

Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"symfony/browser-kit": "^6.3",
"symfony/process": "^6.3",
"symplify/easy-coding-standard": "^12.3",
"voku/portable-utf8": "dev-master as 6.0.13",
"yii2-extensions/phpstan": "^0.3.0",
"yiisoft/yii2-debug": "^2.1.27|^22",
"yiisoft/yii2-gii": "^2.2.7|^22"
Expand Down
283 changes: 145 additions & 138 deletions composer.lock

Large diffs are not rendered by default.

57 changes: 33 additions & 24 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,45 @@
services:
yii2-apache:
build:
args:
USER_ID: ${USER_ID:-1000}
GROUP_ID: ${GROUP_ID:-1000}
USER_NAME: ${USER_NAME:-www-data}
GROUP_NAME: ${GROUP_NAME:-www-data}
context: .
dockerfile: docker/apache/Dockerfile
app-basic:
image: ghcr.io/yii2-extensions/apache:8.4-debian-dev-v1.0.0
container_name: yii2-apache
entrypoint: ["/usr/local/bin/entrypoint.sh"]
env_file:
- .env
environment:
TZ: "UTC"
YII_DEBUG: "${YII_DEBUG:-false}"
YII_ENV: "${YII_ENV:-prod}"
# Apache Configuration
APACHE_DISABLE_OCSP_STAPLING: ${APACHE_DISABLE_OCSP_STAPLING:-true}
APACHE_SSL_REDIRECT: ${APACHE_SSL_REDIRECT:-true}
# SSL Configuration
SSL_AUTO_GENERATE: ${SSL_AUTO_GENERATE:-false}
SSL_CERT_FILE: ${SSL_CERT_FILE:-/etc/apache2/ssl/localhost.pem}
SSL_KEY_FILE: ${SSL_KEY_FILE:-/etc/apache2/ssl/localhost-key.pem}
# Yii2 Configuration
YII_DEBUG: "${YII_DEBUG:-true}"
YII_ENV: "${YII_ENV:-dev}"
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost/ || exit 1"]
interval: 10s
timeout: 5s
retries: 5
start_period: 25s
test: ["CMD", "curl", "-f", "http://localhost/health"]
interval: 30s
timeout: 3s
retries: 3
start_period: 40s
ports:
- '8080:80'
- '8443:443'
restart: always
tty: true
volumes:
- ./:/app
- composer_cache:/var/www/.composer/cache
working_dir: /app
# Application directory (exclude vendor and node_modules for performance)
- ./:/var/www/app:delegated
- ./web/ssl:/etc/apache2/ssl:ro
- assets_data:/var/www/app/web/assets
# Persist dependencies for faster rebuilds
- composer_cache:/var/www/.composer
- npm_cache:/var/www/.npm
# Runtime directory as named volume to avoid permission issues
- runtime_data:/var/www/app/runtime

volumes:
composer_cache:
driver: local
npm_cache:
driver: local
runtime_data:
driver: local
assets_data:
driver: local
64 changes: 0 additions & 64 deletions docker/apache/Dockerfile

This file was deleted.

234 changes: 0 additions & 234 deletions docker/apache/apache.conf

This file was deleted.

Loading
Loading