-
-
Notifications
You must be signed in to change notification settings - Fork 2
refactor: Update Docker configurations to use named volumes for Composer cache, improving consistency across services. #115
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
…ser cache, improving consistency across services.
WalkthroughThe changes update the Docker Compose configurations for three services by replacing the Composer cache directory's host bind mount with a Docker-managed named volume called Changes
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
⏰ 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). (5)
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. 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #115 +/- ##
===========================================
Coverage 100.00% 100.00%
Complexity 36 36
===========================================
Files 23 23
Lines 621 621
===========================================
Hits 621 621 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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
♻️ Duplicate comments (2)
docker-compose.yml (2)
25-26
: Same ownership caveat as nginx composeSee the note in
docker-compose.nginx.yml
; the same user-permission concern applies here.
29-30
: Consider makingcomposer_cache
an external global volumeDuplicated suggestion; refer to previous comment in
docker-compose.nginx.yml
.
🧹 Nitpick comments (2)
docker-compose.nginx.yml (1)
29-30
: Optional: declare the volume asexternal
for cross-service reuseAll three compose files now define a local
composer_cache
volume. When these files are brought up separately that’s fine, but if they’re combined (docker compose -f docker-compose.yml -f docker-compose.nginx.yml …
) you’ll end up with multiple project-scoped volumes that do not share cache data.Consider adding
volumes: composer_cache: external: trueand creating the volume once (
docker volume create composer_cache
) so every stack shares the same Composer cache.docker-compose.frankenphp.yml (1)
35-35
: Optional: markcomposer_cache
as external here tooMirrors the recommendation in the other compose files to avoid redundant volumes when stacks are combined.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
docker-compose.frankenphp.yml
(1 hunks)docker-compose.nginx.yml
(1 hunks)docker-compose.yml
(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 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-compose.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.
⏰ 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). (2)
- GitHub Check: test-frankenphp
- GitHub Check: test-frankenphp
🔇 Additional comments (2)
docker-compose.nginx.yml (1)
25-26
: Check container-side write permissions on new named volumeSwitching from a host bind mount to a Docker-managed volume changes the ownership of
/var/www/.composer/cache
toroot:root
on first run.
If your Dockerfile switches to thewww-data
(or custom) user before running Composer, writes will fail. Add aninit
command (chown -R ${USER_NAME}:${GROUP_NAME} /var/www/.composer/cache
) or create the volume in the Dockerfile with correct ownership.docker-compose.frankenphp.yml (1)
27-29
: Named volume added – verify cache persists across rebuildsGood move; just ensure that the first container run initialises the cache directory with writable permissions for the running PHP user (see nginx compose comment).
…ions for consistency.
…onfigurations for consistency.
Summary by CodeRabbit