Skip to content

Conversation

terabytesoftw
Copy link
Member

@terabytesoftw terabytesoftw commented Jul 12, 2025

Q A
Is bugfix ✔️
New feature
Breaks BC

Summary by CodeRabbit

  • New Features

    • Added support for running the application with the Caddy web server in Docker.
    • Introduced a new Docker Compose setup for Caddy, including persistent storage and environment configuration.
    • Added a Caddy server configuration optimized for local development with enhanced security and HTTPS support.
    • Included automated tests for the Caddy environment in the CI workflow.
    • Updated port mappings and HTTPS access URLs for all supported servers (Apache, Caddy, FrankenPHP, Nginx) to use secure ports.
  • Chores

    • Added supervisor configuration to manage Caddy and PHP-FPM processes within the container.

Copy link

coderabbitai bot commented Jul 12, 2025

## Walkthrough

This change introduces a new Caddy-based Docker environment for a Yii 2.0 PHP application. It adds a Docker Compose configuration, Dockerfile, Caddyfile, and supervisord settings for Caddy and PHP-FPM. A new GitHub Actions job is created to run tests in this environment, mirroring existing workflows for other web servers.

## Changes

| Files/Paths                                                            | Change Summary                                                                                                    |
|------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|
| .github/workflows/docker.yml                                           | Added a `test-caddy` CI job to build, run, and test the app using the new Caddy Docker Compose setup; renamed some step names in existing jobs. |
| docker-compose.caddy.yml                                               | New Docker Compose file defining the `yii2-caddy` service, environment, ports, and named volumes.                |
| docker/caddy/Dockerfile                                                | New Dockerfile for a PHP 8.4 FPM + Caddy image with extensions, Node.js, supervisor, and custom entrypoint.      |
| docker/caddy/Caddyfile                                                 | New Caddy web server configuration for HTTPS, PHP-FPM, security headers, URL rewriting, and static assets.       |
| docker/supervisord/conf.d/caddy-php-fpm.conf                           | New supervisord config to manage both `php-fpm` and `caddy` processes in the container.                          |
| README.md                                                             | Updated documentation to include Caddy environment setup and HTTPS port usage for all servers.                   |
| docker-compose.frankenphp.yml                                          | Updated port mappings and reordered `tty: true` line in `yii2-frankenphp` service.                               |
| docker-compose.nginx.yml                                               | Updated port mappings in `yii2-nginx` service.                                                                   |

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant GitHub Actions
    participant Docker Compose
    participant yii2-caddy Container
    participant Caddy
    participant PHP-FPM
    participant Codeception

    GitHub Actions->>Docker Compose: Start services (docker-compose.caddy.yml)
    Docker Compose->>yii2-caddy Container: Build and run
    yii2-caddy Container->>Caddy: Start via supervisord
    yii2-caddy Container->>PHP-FPM: Start via supervisord
    GitHub Actions->>yii2-caddy Container: Run Codeception build/tests
    Codeception->>Caddy: Make HTTP requests
    Caddy->>PHP-FPM: Forward PHP requests
    PHP-FPM-->>Caddy: Return responses
    Caddy-->>Codeception: Return HTTP responses

Possibly related PRs

Suggested labels

enhancement

Poem

🐇
A Caddy hops into the Docker den,
With PHP-FPM and friends again.
Compose and supervise, all in the mix,
Secure and swift, with clever new tricks.
CI now tests with a Caddy delight—
The rabbit approves, all systems are right!


<!-- walkthrough_end -->


---

<details>
<summary>📜 Recent review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**


<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 4acd9b7fed96cd11aecabf59f3a5e8b783a989f3 and b1e4d7492f6be5672bf6160f8a2eae10e0227c0d.

</details>

<details>
<summary>📒 Files selected for processing (4)</summary>

* `.github/workflows/docker.yml` (3 hunks)
* `README.md` (3 hunks)
* `docker-compose.frankenphp.yml` (1 hunks)
* `docker-compose.nginx.yml` (1 hunks)

</details>

<details>
<summary>✅ Files skipped from review due to trivial changes (3)</summary>

* docker-compose.nginx.yml
* docker-compose.frankenphp.yml
* README.md

</details>

<details>
<summary>🚧 Files skipped from review as they are similar to previous changes (1)</summary>

* .github/workflows/docker.yml

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)</summary>

* GitHub Check: codeception / PHP 8.3-windows-latest
* GitHub Check: codeception / PHP 8.1-windows-latest
* GitHub Check: test-frankenphp
* GitHub Check: test-caddy
* GitHub Check: test-frankenphp
* GitHub Check: test-caddy

</details>

</details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ENdO32nO49KOP7jIv202h/iu4u6Kyu2u7QKbJi6KpKDi7jOKUKLICBgTNVgJVHK8VTV6BakMF0B22zE+I0WzMFqDfjd7I06wNtFhEihicKFrDfZwOSAujwStYKp48js1MU/qC9YSj+h4HiHjfEGIGURQ0DV6zeQ4w0Y5v60wzDSw8G+ww5UYLBeQBG61lG6LTFvVqdPIv6Cm2SWmyNlsjrWyW25yeWFoYWyiCW+KXSix85N+0onTtczObc3e7vp7o27tGDq2uEd/IJ/jqkpO3gvCap6EAOx5F21yzQoCKOwW7Btvpp6+9pxqxEaKwZ02t/v8LBfwFlN9EfVUYG9W2SK4fwpcP/JQABooAffuu6wXLh9XN62Db60R85qRy3OR55mktR1JQkzRPBGtY0ffZrRm9+OwFwFQEbYU0cOHBBJRNBHeOlzhOoHaqaIgHanWF5o2LQHahXWlw+JAA2tmLQD8AIAAOzxDdff4MC0DfBoCiAqCxAf4/CxCPRoAf4kAlp9clqzc/AlrTfCEVftcCCfAkANq0C9cNo/DLixDf4fAf7f69fLgCAnefC/6xAlpoDLgJAkCAokDPTLjLi9cMDPT0BtcQDfjVe1f1dvqNd0B2ofv6BAA= -->

<!-- internal state end -->
<!-- tips_start -->

---

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

<details>
<summary>❤️ Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=yii2-extensions/app-basic&utm_content=119):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Explain this complex logic.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai explain this code block.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and explain its main purpose.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

### Support

Need help? Create a ticket on our [support page](https://www.coderabbit.ai/contact-us/support) for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->

Copy link

codecov bot commented Jul 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (3656ada) to head (b1e4d74).
Report is 2 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##                main      #119   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
  Complexity        36        36           
===========================================
  Files             23        23           
  Lines            621       621           
===========================================
  Hits             621       621           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
.github/workflows/docker.yml (1)

66-70: Fix step naming inconsistency.

The step naming is inconsistent with other test jobs. You have separate "Codeception build" step but then combine build and tests in the final step. For consistency with other jobs, either:

  1. Keep separate steps like test-apache (lines 38-42), or
  2. Rename the second step to just "Run codeception tests"

Current other jobs have:

- name: Codeceptcion build.
- name: Run codeception tests.

Consider aligning with this pattern:

- name: Codeception build.
  run: docker exec yii2-caddy vendor/bin/codecept build

- name: Run codeception tests.
  run: docker exec yii2-caddy vendor/bin/codecept run
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3656ada and 4acd9b7.

📒 Files selected for processing (5)
  • .github/workflows/docker.yml (1 hunks)
  • docker-compose.caddy.yml (1 hunks)
  • docker/caddy/Caddyfile (1 hunks)
  • docker/caddy/Dockerfile (1 hunks)
  • docker/supervisord/conf.d/caddy-php-fpm.conf (1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: terabytesoftw
PR: yii2-extensions/app-basic#102
File: docker/apache/Dockerfile:0-0
Timestamp: 2025-07-10T13:59:10.805Z
Learning: In docker/apache/Dockerfile, the queue.conf copy command is intentionally commented out because yii2-queue is optional. Users should uncomment the line `COPY docker/apache/supervisord/conf.d/queue.conf /etc/supervisor/conf.d/queue.conf` only if they install yii2-queue.
docker/supervisord/conf.d/caddy-php-fpm.conf (1)
Learnt from: terabytesoftw
PR: yii2-extensions/app-basic#102
File: docker/apache/Dockerfile:0-0
Timestamp: 2025-07-10T13:59:10.805Z
Learning: In docker/apache/Dockerfile, the queue.conf copy command is intentionally commented out because yii2-queue is optional. Users should uncomment the line `COPY docker/apache/supervisord/conf.d/queue.conf /etc/supervisor/conf.d/queue.conf` only if they install yii2-queue.
docker-compose.caddy.yml (1)
Learnt from: terabytesoftw
PR: yii2-extensions/app-basic#102
File: docker/apache/Dockerfile:0-0
Timestamp: 2025-07-10T13:59:10.805Z
Learning: In docker/apache/Dockerfile, the queue.conf copy command is intentionally commented out because yii2-queue is optional. Users should uncomment the line `COPY docker/apache/supervisord/conf.d/queue.conf /etc/supervisor/conf.d/queue.conf` only if they install yii2-queue.
docker/caddy/Dockerfile (1)
Learnt from: terabytesoftw
PR: yii2-extensions/app-basic#102
File: docker/apache/Dockerfile:0-0
Timestamp: 2025-07-10T13:59:10.805Z
Learning: In docker/apache/Dockerfile, the queue.conf copy command is intentionally commented out because yii2-queue is optional. Users should uncomment the line `COPY docker/apache/supervisord/conf.d/queue.conf /etc/supervisor/conf.d/queue.conf` only if they install yii2-queue.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: codeception / PHP 8.4-windows-latest
  • GitHub Check: codeception / PHP 8.1-windows-latest
  • GitHub Check: codeception / PHP 8.3-windows-latest
  • GitHub Check: test-frankenphp
  • GitHub Check: test-caddy
  • GitHub Check: test-frankenphp
  • GitHub Check: test-caddy
🔇 Additional comments (10)
docker/supervisord/conf.d/caddy-php-fpm.conf (1)

1-22: Well-structured supervisord configuration with correct startup priorities.

The configuration properly manages both PHP-FPM and Caddy processes with appropriate priority ordering (PHP-FPM starts first with priority 5, Caddy follows with priority 10). The user settings are correctly configured - PHP-FPM runs as root for socket permissions, while Caddy runs as www-data for security.

docker-compose.caddy.yml (1)

1-35: Well-configured Docker Compose service for Caddy setup.

The configuration is comprehensive with proper:

  • Build arguments for flexible user/group configuration
  • Environment variable handling with sensible defaults
  • Port mappings aligned with Caddyfile (8081 for HTTP, 8444 for HTTPS)
  • Named volumes for persistent storage of Caddy config/data and Composer cache
  • Appropriate restart policy and TTY settings
docker/caddy/Dockerfile (4)

12-26: Comprehensive PHP extension installation for Yii2.

The PHP extensions selection covers all typical Yii2 requirements including database (pdo_mysql, pdo_pgsql), image processing (gd, imagick), internationalization (intl), and development tools (xdebug). Using mlocati/php-extension-installer is an excellent choice for reliable extension installation.


65-71: Proper PHP-FPM Unix socket configuration.

The PHP-FPM configuration correctly switches from TCP to Unix socket communication, which is more efficient for same-machine communication with Caddy. The ownership and permissions setup ensures proper access between PHP-FPM and Caddy processes.


76-77: Consistent with yii2-queue optional pattern.

The commented queue.conf line follows the established pattern from other Dockerfiles where yii2-queue is optional. Users can uncomment this line when they install yii2-queue.


84-90: Excellent script validation practices.

The script validation includes line ending conversion, executable permissions, and syntax checking. This prevents common deployment issues and ensures scripts are properly formatted.

docker/caddy/Caddyfile (4)

20-27: Excellent security headers configuration.

The security headers provide comprehensive protection:

  • X-Frame-Options prevents clickjacking
  • X-XSS-Protection enables browser XSS filtering
  • X-Content-Type-Options prevents MIME sniffing
  • HSTS enforces HTTPS for one year
  • Server header removal reduces information disclosure

35-43: Optimal static file caching configuration.

The static file handling correctly identifies common web assets and applies aggressive caching (1 year max-age) which is perfect for versioned assets in production environments.


45-55: Comprehensive access restrictions for Yii2 security.

The access restrictions properly protect sensitive directories (.git, vendor, runtime, environment files) and prevent PHP execution in the assets directory, which is a crucial Yii2 security practice.


8-9: Verify mkcert certificate setup

No mkcert commands or SSL mounts were found in the codebase, yet the Caddyfile references certificates in /app/docker/ssl. Please confirm that you have one of the following in place:

  • An entrypoint or init script that generates mkcert certificates into /app/docker/ssl at container startup
  • A host volume mount of pre-generated certificates into /app/docker/ssl

Key locations to review:

  • docker/caddy/Caddyfile (lines 8–9)
  • Any docker-compose*.yml files for volume mappings
  • Entrypoint/init scripts touching the ssl directory

@terabytesoftw terabytesoftw merged commit 949cd54 into main Jul 12, 2025
35 checks passed
@terabytesoftw terabytesoftw deleted the feat-mini-3 branch July 12, 2025 14:24
@terabytesoftw terabytesoftw added the enhancement New feature or request label Jul 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant