Skip to content

Built the local dev URL from 'COMPOSE_PROJECT_NAME' so each clone gets its own hostname. - #900

Merged
AlexSkrypnyk merged 1 commit into
mainfrom
feature/compose-project-url
Oct 2, 2026
Merged

AlexSkrypnyk merged 1 commit into
mainfrom
feature/compose-project-url

Conversation

@AlexSkrypnyk

@AlexSkrypnyk AlexSkrypnyk commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Summary

The default local URL in docker-compose.yml now follows the Compose project name. The x-url anchor now defaults to http://${COMPOSE_PROJECT_NAME:-behat-steps}.docker.amazee.io, so a checkout in a directory called behat-steps3 serves its site at http://behat-steps3.docker.amazee.io. An explicit LOCALDEV_URL still overrides it.

The anchor hardcoded http://behat-steps.docker.amazee.io for every checkout, and it feeds both LOCALDEV_URL and LAGOON_LOCALDEV_URL in every container. Pygmy's HAProxy template (haproxy.tmpl in pygmystack/haproxy) builds each route from coalesce(LAGOON_LOCALDEV_URL, LAGOON_ROUTE, "<container>.docker.amazee.io"). With 2 or more clones up (say behat-steps, behat-steps2 and behat-steps3), their nginx containers registered under the same hostname and a request landed on whichever stack HAProxy picked. ahoy drush passes -l ${LOCALDEV_URL}, so the ahoy login link 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 info and the ahoy login link both match the clone they run in. PROJECT, which ahoy info also prints, is still behat-steps. CI is unaffected: its checkout directory is behat-steps, so the URL renders as it did before, and Behat reaches the site through base_url: http://nginx:8080 rather than this hostname.

Before / After

BEFORE - the x-url default is the constant http://behat-steps.docker.amazee.io

┌───────────────┬──────────────────────────────────────┬─────────────────┐
│ checkout      │ LOCALDEV_URL                         │ HAProxy route   │
├───────────────┼──────────────────────────────────────┼─────────────────┤
│ behat-steps/  │ http://behat-steps.docker.amazee.io  │ shared by all 3 │
│ behat-steps2/ │ http://behat-steps.docker.amazee.io  │ shared by all 3 │
│ behat-steps3/ │ http://behat-steps.docker.amazee.io  │ shared by all 3 │
└───────────────┴──────────────────────────────────────┴─────────────────┘
AFTER - the x-url default is http://${COMPOSE_PROJECT_NAME:-behat-steps}.docker.amazee.io

┌───────────────┬──────────────────────────────────────┬─────────────────┐
│ checkout      │ LOCALDEV_URL                         │ HAProxy route   │
├───────────────┼──────────────────────────────────────┼─────────────────┤
│ behat-steps/  │ http://behat-steps.docker.amazee.io  │ its own         │
│ behat-steps2/ │ http://behat-steps2.docker.amazee.io │ its own         │
│ behat-steps3/ │ http://behat-steps3.docker.amazee.io │ its own         │
└───────────────┴──────────────────────────────────────┴─────────────────┘

Changes

  • docker-compose.yml (x-url anchor): the default is http://${COMPOSE_PROJECT_NAME:-behat-steps}.docker.amazee.io. Compose derives the project name from the checkout directory (or from -p or COMPOSE_PROJECT_NAME), so each clone gets its own hostname in LOCALDEV_URL and LAGOON_LOCALDEV_URL. Vortex builds LOCALDEV_URL from COMPOSE_PROJECT_NAME the same way.
  • docker-compose.yml (chrome service): the 7900 port comment points at ahoy info, which prints the real noVNC URL. It replaces a hardcoded http://behat-steps.docker.amazee.io:7900/... link that never worked, because 7900 is published on a random host port and Pygmy only routes nginx.
  • CONTRIBUTING.md: the local setup steps describe the site URL as http://<directory>.docker.amazee.io/, note that each checkout gets its own hostname, and point at ahoy info for the exact URL.

Summary

  • The local URL now defaults to http://${COMPOSE_PROJECT_NAME:-behat-steps}.docker.amazee.io. An explicit LOCALDEV_URL can still override this default.
  • The Chrome port comment directs users to ahoy info to find the noVNC URL.
  • CONTRIBUTING.md now documents the checkout-directory hostname and directs users to ahoy info for the exact URL.

Testing

  • Test results were not provided.

…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.
@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

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 configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Team

Run ID: e1718e86-ea1b-4ffd-a1cb-0441836461af

📥 Commits

Reviewing files that changed from the base of the PR and between 6c3e7b5 and d213ccc.

📒 Files selected for processing (2)
  • CONTRIBUTING.md
  • docker-compose.yml

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.


Walkthrough

The local Compose hostname now uses the project name, with behat-steps as the fallback. The access instructions and Chrome service comment direct users to ahoy info for the exact URL.

Changes

Local URL configuration

Layer / File(s) Summary
Project-specific hostname and access instructions
docker-compose.yml, CONTRIBUTING.md
The Compose URL default uses COMPOSE_PROJECT_NAME and falls back to behat-steps. The instructions note that clones can run side by side. The Chrome service comment directs users to ahoy info for the noVNC URL.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to d213c

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)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: deriving each local development hostname from COMPOSE_PROJECT_NAME.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


A rabbit reads the hostname with care
The project name now leads it there
If no name blooms, the fallback stays
ahoy info shows the URL’s ways
Clones share the burrow side by side
The Chrome port keeps its place with pride

Comment @coderabbitai help to get the list of available commands.

@AlexSkrypnyk
AlexSkrypnyk enabled auto-merge (squash) October 2, 2026 09:55
@AlexSkrypnyk AlexSkrypnyk added the AUTOMERGE Pull request has been approved and set to automerge label Oct 2, 2026
@codecov

codecov Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.22%. Comparing base (90b6cd0) to head (d213ccc).
⚠️ Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AlexSkrypnyk
AlexSkrypnyk merged commit 6a0c0af into main Oct 2, 2026
19 checks passed
@AlexSkrypnyk
AlexSkrypnyk deleted the feature/compose-project-url branch October 2, 2026 10:02
AlexSkrypnyk added a commit that referenced this pull request Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AUTOMERGE Pull request has been approved and set to automerge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant