Implement MySQL data container support and add test suites across PHP, Node.js, and Python#2
Open
ameliaknowscode wants to merge 2 commits into
Open
Implement MySQL data container support and add test suites across PHP, Node.js, and Python#2ameliaknowscode wants to merge 2 commits into
ameliaknowscode wants to merge 2 commits into
Conversation
…de.js, and Python - Refactor PHP BuildCommand: extract buildDataRunCommand, fix default port bug (hardcoded 5432 for MySQL), add volume mount support for data containers - Implement full data container handling in Node.js and Python, mirroring the PHP implementation (relational + non-relational, all five DB types) - Fix import typo in nodejs/commands/build.js (fimport -> import) - Add PHPUnit test suite (17 tests), Node.js node:test suite (24 tests), and pytest suite (26 tests) covering env vars, Dockerfile selection, port defaults, and volume configuration Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Fix .env lookup: check project root first, build/ as fallback (was only checking build/, inconsistent with PHP implementation) - Fix volume mount: use APP_HOST_VOLUME_PATH / APP_CONTAINER_VOLUME_PATH env var names (was using incorrect APP_VOLUME_HOST / APP_VOLUME_CONTAINER) - Fix app image build args: pass DATA_REL_TYPE and DATA_NONREL_TYPE so conditional driver/client installation in Dockerfiles fires correctly (was only passing BASE_IMAGE, leaving mysql client uninstalled) Found and fixed during Node.js and Python smoke testing against a live MySQL container. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Author
|
This is an overview of what existed already and what I added in this PR:
The Non-relational tests are only the automated tests, I did not create any test projects to test manually. But MySQL in PHP, Node.js, and Python I did! I also tested with one of the Laravel 12 apps I built, it worked great! |
dsdobrzynski
self-requested a review
May 5, 2026 16:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.envlookup now checks the project root first withbuild/as a fallback, consistent with the PHP CLIAPP_HOST_VOLUME_PATH/APP_CONTAINER_VOLUME_PATHDATA_REL_TYPEandDATA_NONREL_TYPEas build args, so conditional driver/client installation in Dockerfiles (e.g.default-mysql-client,pdo_mysql,pymysql) fires correctlyrunDataContainerwas hardcoded to port5432even when MySQL was selected; now defaults to3306for mysql/mariadbDATA_REL_HOST_VOLUME_PATH/DATA_REL_CONTAINER_VOLUME_PATHwere documented in.env.examplebut never wired up)nodejs/commands/build.js(fimport→import)node:test(24 tests), pytest (26 tests) — covering env var correctness, Dockerfile selection, port defaults, and volume configurationTest plan
php vendor/bin/phpunit— 17/17 passingnpm test— 24/24 passingpython -m pytest python/tests/— 26/26 passingphp bin/dapp-bk buildagainst a Laravel 12 app — containers up, DB reachablenode nodejs/bin/dapp-bk-node.js build— app container serving,/health/dbreturns MySQL connection OKpython -m hig_docker_build_kit.cli build— app container serving,/health/dbreturns MySQL connection OK🤖 Generated with Claude Code