-
-
Notifications
You must be signed in to change notification settings - Fork 2
fix(build): Update Docker commands and badge links in README.md
for accurate workflow status.
#184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… accurate workflow status.
WalkthroughReplaces docker-compose v1 usage with Docker Compose v2 in CI, adds a loop-based readiness probe and diagnostic version checks in the GitHub Actions workflow, fixes a Codeception step name, updates README badge links, appends a changelog entry, enables PHP error logging to stderr, and tightens Supervisor queue startup/termination and logging settings. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant GA as GitHub Actions
participant DE as Docker Engine
participant C as Container (service)
participant H as Health Probe (curl)
GA->>DE: docker compose up -d --build
DE-->>GA: Containers started
rect rgba(200,230,255,0.25)
note right of GA: Readiness loop (max 60 × 2s)
loop until 200/302 or timeout
GA->>C: docker exec ... curl https://localhost -s -o /dev/null -w "%{http_code}"
C-->>GA: HTTP status (200/302 or other)
end
end
alt success (200/302)
GA-->>GA: "Service is ready" (exit 0)
else timeout
GA->>DE: docker compose logs
DE-->>GA: Container logs
GA-->>GA: "Service not ready" (exit 1)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this 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
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
README.md (1)
72-74
: Update to Docker Compose v2 syntax.Docs still show docker-compose v1. Please switch to
docker compose
to match the workflow and modern Docker.- docker-compose up -d + docker compose up -d
🧹 Nitpick comments (4)
docker/php/php.ini (1)
5-6
: Good move: route PHP errors to stderr for container logging.This aligns logs with Docker’s stdout/stderr streams. Consider optionally setting
log_errors_max_len = 16384
to avoid truncation in verbose traces.log_errors = On error_log = /proc/self/fd/2 +log_errors_max_len = 16384
README.md (1)
139-141
: Optional: align PHPStan badge link with branch-filtered pattern.For consistency with the top badges, add the branch query to the link target.
-[](https://github.com/yii2-extensions/app-basic/actions/workflows/static.yml) +[](https://github.com/yii2-extensions/app-basic/actions/workflows/static.yml?query=branch%3Aapache)docker/supervisor/conf.d/queue.conf (1)
5-11
: Queue autostart off + sane signals: good defaults for optional component.This avoids starting a missing queue and ensures group termination. Consider adding a graceful stop window.
stopasgroup=true killasgroup=true stopsignal=TERM +stopwaitsecs=30
.github/workflows/build.yml (1)
45-46
: Fix typo in step name.“Codeceptcion” → “Codeception”.
- - name: Codeceptcion build. + - name: Codeception build.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (5)
.github/workflows/build.yml
(1 hunks)CHANGELOG.md
(1 hunks)README.md
(1 hunks)docker/php/php.ini
(1 hunks)docker/supervisor/conf.d/queue.conf
(1 hunks)
🧰 Additional context used
🧠 Learnings (8)
📚 Learning: 2025-08-31T15:34:39.060Z
Learnt from: terabytesoftw
PR: yii2-extensions/app-basic#142
File: README.md:0-0
Timestamp: 2025-08-31T15:34:39.060Z
Learning: In yii2-extensions/app-basic project, the dev-road-runner branch is treated as the main configuration branch with no stable releases available. Static badges pointing to dev branches are intentionally used to direct users to the development version.
Applied to files:
README.md
📚 Learning: 2025-07-09T14:52:41.210Z
Learnt from: terabytesoftw
PR: yii2-extensions/app-basic#97
File: docs/installation.md:5-8
Timestamp: 2025-07-09T14:52:41.210Z
Learning: The Yii2 framework has multiple active branches including the 2.0.x branch (maintenance/LTS) and the 22.0 branch (development). When specifying version requirements, "2.0.53+ or 22.x" is accurate and should not be changed to only reference the 2.x branch.
Applied to files:
README.md
📚 Learning: 2025-09-02T15:21:03.184Z
Learnt from: terabytesoftw
PR: yii2-extensions/app-basic#170
File: docker/apache/Dockerfile:27-35
Timestamp: 2025-09-02T15:21:03.184Z
Learning: In yii2-extensions/app-basic, this is a demo template where simplicity and ease of use are prioritized over production-grade security hardening. Security trade-offs like using curl | bash for Node.js installation are acceptable for demonstration purposes.
Applied to files:
README.md
📚 Learning: 2025-09-02T15:23:37.606Z
Learnt from: terabytesoftw
PR: yii2-extensions/app-basic#170
File: docker/init.sh:26-49
Timestamp: 2025-09-02T15:23:37.606Z
Learning: The yii2-extensions/app-basic repository is a demo template where practical functionality and ease of setup take priority over security hardening measures.
Applied to files:
README.md
📚 Learning: 2025-09-02T09:36:57.071Z
Learnt from: terabytesoftw
PR: yii2-extensions/app-basic#166
File: .github/workflows/build.yml:31-33
Timestamp: 2025-09-02T09:36:57.071Z
Learning: The yii2-extensions/app-basic repository is a demo template that includes pre-generated SSL certificates using mkcert, designed to provide a "one-click" transparent demo experience for users.
Applied to files:
README.md
📚 Learning: 2025-09-02T15:20:17.088Z
Learnt from: terabytesoftw
PR: yii2-extensions/app-basic#170
File: config/web/modules.php:14-15
Timestamp: 2025-09-02T15:20:17.088Z
Learning: In the yii2-extensions/app-basic repository, this is a demo template where permissive development settings like allowedIPs => ['*'] for debug and gii modules are acceptable for ease of setup and demonstration purposes.
Applied to files:
README.md
📚 Learning: 2025-09-02T15:23:30.902Z
Learnt from: terabytesoftw
PR: yii2-extensions/app-basic#170
File: docker/init.sh:1-1
Timestamp: 2025-09-02T15:23:30.902Z
Learning: In yii2-extensions/app-basic repository, the maintainer terabytesoftw prefers to keep demo template scripts simple without additional bash safety measures like strict mode (set -Eeuo pipefail), as they consider different quality standards appropriate for demo/template code versus production code.
Applied to files:
README.md
📚 Learning: 2025-07-10T13:59:10.839Z
Learnt from: terabytesoftw
PR: yii2-extensions/app-basic#102
File: docker/apache/Dockerfile:0-0
Timestamp: 2025-07-10T13:59:10.839Z
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.
Applied to files:
docker/supervisor/conf.d/queue.conf
🔇 Additional comments (6)
CHANGELOG.md (1)
20-20
: Changelog entry looks correct.Entry matches PR scope and version section. No further action needed.
README.md (1)
18-23
: Badge links correctly filter workflow runs by branch.Nice improvement for clarity when viewing status for apache branch.
docker/supervisor/conf.d/queue.conf (1)
14-15
: Log to stdout with no rotation cap: LGTM.Matches container log collection best practices.
.github/workflows/build.yml (3)
28-31
: Compose v2 detection step is helpful.Showing Docker and Compose versions simplifies CI debugging.
34-34
: Compose v2 migration: LGTM.
docker compose up -d --build
is the right call here.
36-44
: Container name matches configuration
Confirmedcontainer_name: yii2-apache
in docker-compose.yml; the readiness loop will target the correct container.
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this 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 (3)
.github/workflows/build.yml (3)
28-31
: Compose v2 detection is fine; add a quick guard and make shell explicit.Minor hardening so failures are clearer on runners without the Compose plugin.
- - name: Show docker version. - run: | - docker version - docker compose version + - name: Show docker version. + shell: bash + run: | + docker version + if ! docker compose version; then + echo "Docker Compose v2 not available"; docker plugin ls || true; exit 1 + fi
34-34
: Pull latest base images during build to avoid stale caches.Keeps CI green when upstream bases get security fixes.
- run: docker compose up -d --build + run: docker compose up -d --build --pull always
36-44
: Make the readiness probe resilient: container naming, scheme, and timing.Two potential flakiness sources: relying on a fixed container name and assuming HTTPS inside the container. Use the service’s container ID from Compose, try HTTP then HTTPS, and give a bit more time.
- - name: Wait for readiness. - run: | - for i in {1..60}; do - if docker exec yii2-apache sh -lc "curl -ksS -o /dev/null -w '%{http_code}' https://localhost | grep -qE '200|302'"; then - echo "Service is ready"; exit 0; fi - sleep 2 - done - echo "Service not ready"; docker logs yii2-apache; exit 1 + - name: Wait for readiness. + shell: bash + run: | + CID="$(docker compose ps -q yii2-apache)" + if [[ -z "$CID" ]]; then + echo "Container for service 'yii2-apache' not found." + docker compose ps + exit 1 + fi + for i in {1..90}; do + if docker exec "$CID" sh -lc "for u in http://localhost https://localhost; do code=\$(curl -ksS -o /dev/null -w '%{http_code}' \"\$u\" || true); case \$code in 200|302) exit 0;; esac; done; exit 1"; then + echo 'Service is ready'; exit 0 + fi + sleep 2 + done + echo 'Service not ready' + docker compose logs yii2-apache || true + exit 1Verification requested:
- Confirm the service inside the container actually listens on HTTP or HTTPS localhost.
- Confirm the Compose service name is
yii2-apache
; if it differs, adjust the service key used indocker compose ps -q
.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
.github/workflows/build.yml
(1 hunks)README.md
(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- README.md
🔇 Additional comments (1)
.github/workflows/build.yml (1)
45-46
: Typo fix in step name looks good.No functional change; improves readability.
Summary by CodeRabbit