Repository navigation
fix(init,check): unique Compose project per scaffold, and report taken stack ports - #368
Merged
Merged
Conversation
A second project scaffolded under a directory name used before shared the first one's Compose project, so docker compose up ran its old images and reused its database. The compose file now names the project after the directory plus a random suffix, keeps a name an earlier run wrote, and pins no container names. Closes #365
The stack publishes on 127.0.0.1 only, so a program on [::1]:5173 took http://localhost:5173 in the browser while every check passed. init now warns about each taken port, and check fails on one held on [::1]. check also lists running services from the project's compose file instead of matching container names across the machine. Part of #366
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.
Fixes the two blockers from running the self-hosted quickstart against v0.23.0 (fells-code/seamless-auth-api#561).
#365: a reused project name runs the old project's images
The generated compose file had no project name, so two scaffolds in directories with the same name (everyone who follows the quickstart twice has two
my-appprojects) were one Compose project.docker compose upreused the first one'smy-app-apiimage, which crashed against the v0.23 starter withdoes not provide an export named 'requirePermission', and the second project would also have reused the first one's database volume.initwritesname: <directory>-<6 hex>and keeps a name an earlier run wrote, the same wayseamless addalready names its stack. The directory slug moved tosrc/core/composeName.tsandadduses it too.container_names are gone, so two projects run side by side. The three CI scripts that refused to start beside a container namedseamless-dborapino longer need that guard.checklists running services withdocker compose psin the project, rather than matching "api" in every container name on the machine.#366: another program on port 5173 goes unnoticed
The stack publishes on
127.0.0.1only. A Vite dev server on its default[::1]:5173winshttp://localhost:5173in the browser, andcheckpassed every line.initends with a warning for each stack port another program holds, on either loopback, saying what breaks and how to find the program withlsof.checkfails on a stack port held on[::1](its own containers hold127.0.0.1, so only[::1]can show a stranger).checknow suggests Docker may be stopped whencompose psfails, sincedocker --versionpasses without a daemon.Not in this PR: an option to move the web app to another port. Today that means editing four values in three files, and it stays open on #366.
Verified
npm run build,npm test(2122 passed) andnpm run coveragepass.my-app-apiimage from 2026-10-24 and a Vite server on[::1]:5173:init my-appruns in different folders wrotename: my-app-c6e4ebandname: my-app-e35003, with nocontainer_name.initprinted the warning for port 5173 (web) on[::1].docker compose up -d --waitbuilt freshmy-app-c6e4eb-*images, every service went healthy, and the API loggedAPI runningwith noSyntaxError.check --strictpassed the container and health checks and failed only on the[::1]:5173conflict, exit 1.Closes #365
Part of #366