Skip to content

Freeunit#3

Merged
samdark merged 3 commits into
Yii3-Benchmarks:freeunitfrom
freeunitorg:freeunit
May 30, 2026
Merged

Freeunit#3
samdark merged 3 commits into
Yii3-Benchmarks:freeunitfrom
freeunitorg:freeunit

Conversation

@samdark
Copy link
Copy Markdown
Contributor

@samdark samdark commented May 30, 2026

Q A
Is bugfix? ✔️/❌
New feature? ✔️/❌
Breaks BC? ✔️/❌
Fixed issues comma-separated list of tickets # fixed by the PR, if any

qwen-intl and others added 3 commits May 11, 2026 15:07
- Change base image from dunglas/frankenphp to ghcr.io/freeunitorg/freeunit:latest-php8.5
- Replace Caddyfile configurations with Unit JSON configuration for Yii2
- Add unit-config.json for development and production environments
- Update Dockerfile to use Unit control socket directory instead of Caddy directories
- Configure Unit routes and applications according to Yii2 framework requirements
  per https://docs.freeunit.org/howto/yii/
🚀 Key Changes
Runtime Replacement: Switched the base Docker image from dunglas/frankenphp to ghcr.io/freeunitorg/freeunit:latest-php8.5.
Server Architecture: Removed Caddy and FrankenPHP dependencies. FreeUnit now acts as the standalone web server handling HTTP requests and PHP execution directly.
Configuration:
Added unit-config.json for both dev and prod environments, configured according to FreeUnit documentation for Yii.
Enabled dynamic configuration loading via /docker-entrypoint.d.
Docker Compose Updates:
Simplified networking by removing Caddy-specific networks and labels.
Exposed port 80 directly from the application container.
Removed persistent volumes for Caddy data/config.
🛠 Technical Details
Base Image: ghcr.io/freeunitorg/freeunit:latest-php8.5
User Permissions: Configured to run under the unit user with appropriate write access to runtime directories.
Dev Environment: Includes debug settings and direct access to the Unit control socket for easier development and testing.
📖 References
FreeUnit Documentation
Yii Integration Guide
FreeUnit GitHub (pre-1.35.5)
✅ Testing
Please verify that the application starts correctly using docker compose up and that HTTP requests are served properly by the FreeUnit runtime in both development and production modes.
Copilot AI review requested due to automatic review settings May 30, 2026 07:50
@samdark samdark changed the base branch from frankenphp-classic to freeunit May 30, 2026 07:51
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Switches the PHP runtime in the Docker images from FrankenPHP (Caddy-based) to Unit (freeunit distribution). The web server configuration is migrated from Caddyfiles to NGINX Unit JSON configs, and the production compose file moves from a Caddy reverse-proxy network model to directly exposing port 80.

Changes:

  • Replace dunglas/frankenphp base image with ghcr.io/freeunitorg/freeunit:latest-php8.5 and update permission/chown setup for Unit's control socket.
  • Add docker/unit-config.json (prod) and docker/dev/unit-config.json (dev) to replace the removed Caddyfiles; both route *.php to a direct PHP target and static files via a share action with fallback to index.php.
  • Drop the Caddy reverse-proxy wiring in docker/prod/compose.yml (caddy_public network, caddy labels, caddy_data/caddy_config volumes) and expose port 80 directly.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
docker/Dockerfile Switches base image to freeunit, installs curl, replaces FrankenPHP capability/chown setup with Unit runtime dirs, copies Unit JSON configs.
docker/unit-config.json New Unit production config with PHP routing.
docker/dev/unit-config.json New Unit dev config (identical to prod).
docker/dev/Caddyfile Removed (replaced by Unit config).
docker/Caddyfile Removed (replaced by Unit config).
docker/compose.yml Removes caddy_data/caddy_config volumes.
docker/prod/compose.yml Removes caddy network/labels/volumes; publishes port 80 directly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@samdark samdark merged commit bc94ef6 into Yii3-Benchmarks:freeunit May 30, 2026
0 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants