Built the local dev URL from 'COMPOSE_PROJECT_NAME' so each clone gets its own hostname. - #900
Conversation
…s its own hostname. Pygmy routes on 'LAGOON_LOCALDEV_URL', and every clone used the same hardcoded 'behat-steps.docker.amazee.io' default, so stacks from several checkouts shared 1 hostname. The default now follows the Compose project name, which is the checkout directory, and 'LOCALDEV_URL' still overrides it.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour. WalkthroughThe local Compose hostname now uses the project name, with ChangesLocal URL configuration
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~5 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to No confirmed issue blocks merging the project-specific local URL change. Compatibility with underscore-containing checkout names remains unverified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
A rabbit reads the hostname with care Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #900 +/- ##
=======================================
Coverage 98.22% 98.22%
=======================================
Files 53 53
Lines 4686 4686
=======================================
Hits 4603 4603
Misses 83 83 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…s its own hostname. (#900)
Summary
The default local URL in
docker-compose.ymlnow follows the Compose project name. Thex-urlanchor now defaults tohttp://${COMPOSE_PROJECT_NAME:-behat-steps}.docker.amazee.io, so a checkout in a directory calledbehat-steps3serves its site athttp://behat-steps3.docker.amazee.io. An explicitLOCALDEV_URLstill overrides it.The anchor hardcoded
http://behat-steps.docker.amazee.iofor every checkout, and it feeds bothLOCALDEV_URLandLAGOON_LOCALDEV_URLin every container. Pygmy's HAProxy template (haproxy.tmplinpygmystack/haproxy) builds each route fromcoalesce(LAGOON_LOCALDEV_URL, LAGOON_ROUTE, "<container>.docker.amazee.io"). With 2 or more clones up (saybehat-steps,behat-steps2andbehat-steps3), their nginx containers registered under the same hostname and a request landed on whichever stack HAProxy picked.ahoy drushpasses-l ${LOCALDEV_URL}, so theahoy loginlink in every clone pointed at that shared host too.After merge, each clone registers its own Pygmy route, and the "Site local URL" line from
ahoy infoand theahoy loginlink both match the clone they run in.PROJECT, whichahoy infoalso prints, is stillbehat-steps. CI is unaffected: its checkout directory isbehat-steps, so the URL renders as it did before, and Behat reaches the site throughbase_url: http://nginx:8080rather than this hostname.Before / After
Changes
docker-compose.yml(x-urlanchor): the default ishttp://${COMPOSE_PROJECT_NAME:-behat-steps}.docker.amazee.io. Compose derives the project name from the checkout directory (or from-porCOMPOSE_PROJECT_NAME), so each clone gets its own hostname inLOCALDEV_URLandLAGOON_LOCALDEV_URL. Vortex buildsLOCALDEV_URLfromCOMPOSE_PROJECT_NAMEthe same way.docker-compose.yml(chromeservice): the7900port comment points atahoy info, which prints the real noVNC URL. It replaces a hardcodedhttp://behat-steps.docker.amazee.io:7900/...link that never worked, because7900is published on a random host port and Pygmy only routes nginx.CONTRIBUTING.md: the local setup steps describe the site URL ashttp://<directory>.docker.amazee.io/, note that each checkout gets its own hostname, and point atahoy infofor the exact URL.Summary
http://${COMPOSE_PROJECT_NAME:-behat-steps}.docker.amazee.io. An explicitLOCALDEV_URLcan still override this default.ahoy infoto find the noVNC URL.CONTRIBUTING.mdnow documents the checkout-directory hostname and directs users toahoy infofor the exact URL.Testing