feat: complete the Docker setup — wire the compose stack, add a PHP 8.4 CLI image (IP-149)#611
Conversation
…lopment Brings in custom Dockerfiles for PHP-FPM, Apache, and Node from the original feature/docker-env branch, ported cleanly onto develop. - docker-resources/php-fpm/Dockerfile — PHP 8.4-fpm-alpine with all required extensions (pdo_mysql, gd, intl, redis, opcache, etc.) - docker-resources/apache/Dockerfile — Apache 2.4 with PHP-FPM proxy - docker-resources/apache/config/invoiceplane-vhost.conf - docker-resources/node/scripts/entrypoint.sh — Vite dev server with Docker-aware path and HMR configuration Refs InvoicePlane#149 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The branch shipped apache and php-fpm Dockerfiles that docker-compose.yml
never started, and DOCKER.md described an app container that did not
exist. The compose file now runs web (apache, APP_PORT with 8080
default) -> app (php-fpm, matching the vhost's fcgi://app:9000) -> db,
plus mailcatcher.
Adds docker-resources/php-cli: a CLI twin of the php-fpm image (same
extension set: intl, gd, pdo_mysql, bcmath, zip, exif, soap, redis)
with Composer, a 1G memory limit for the test suite, and UID/GID build
args so files written into the mounted repo keep host ownership. It
runs behind a "tools" compose profile as a one-off runner:
docker compose run --rm cli vendor/bin/phpunit
The test suite runs on in-memory sqlite, so tests need no services at
all. DOCKER.md rewritten to match (correct v2 clone URL, services
table, no-host-PHP quick start, ownership troubleshooting).
Refs InvoicePlane#149
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 59 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Completes the standalone Docker setup from
feature/149-docker-setup(issue #149) and adds the missing piece: a CLI image so users and contributors can run the test suite, artisan, and composer with no PHP on the host.What this adds on top of the existing branch
docker-resources/php-cli/Dockerfile— PHP 8.4 CLI (alpine), the exact extension twin of the existing php-fpm image (intl,gd,pdo_mysql,bcmath,zip,exif,soap,redis) plus Composer, a 1G memory limit (the full suite OOMs at the 128M default), and bundledpdo_sqlite— the test suite runs on in-memory sqlite, so tests need zero services.UID/GIDbuild args let Linux users match host ownership for files written into the mounted repo (vendor/, storage/) — this exact mismatch produces hundreds of confusingtempnam()test errors otherwise.docker-compose.ymlactually wires the images in. The branch shipped apache + php-fpm Dockerfiles but the compose file only starteddb+mailcatcher, and DOCKER.md referenced anappcontainer that didn't exist. Now:web(apache, port${APP_PORT:-8080}) →app(php-fpm, matching the vhost'sfcgi://app:9000) →db, plus the newcliservice behind atoolsprofile so it never auto-starts..github/DOCKER.mdrewritten to match reality — corrected clone URL (pointed at v1's repo), a services table, a no-host-PHP quick start, test-suite instructions, and the UID/GID troubleshooting entry.Why a CLI image at all
The vendor tree requires PHP ≥ 8.3 with
intl+gd; typical host PHPs miss at least one of those (Filament table rendering hard-requiresintl, dompdf wantsgd). This image is the supported, reproducible way to runvendor/bin/phpunit— validated by developing the Report Builder with a hand-rolled equivalent of exactly this image.Verified
docker compose configvalid;--profile toolsexposesclialongside the five servicesphp -mshows the full extension set;composer --versionworksdocker compose run --rm cli vendor/bin/phpunit(sqlite in-memory). Note: some company-panel tests fail on this branch's lineage because it predates the permission-seeding fixes ondevelop— pre-existing to this PR; the same command is fully green on branches that include those fixes.web+app) is config-validated against the existing vhost (fcgi://app:9000, docroothtdocs/public); it still needs a bootstrapped.env+ key to serve, per DOCKER.md's quick start.Closes #149
🤖 Generated with Claude Code