Repository navigation
fix(init): start the source-built auth server without the image entrypoint - #294
Merged
Merged
Conversation
…point The local auth compose bind-mounts ./auth over /app, which hides the image's chmod of validateEnvs.sh (mode 644 in the clone), and Dockerfile.dev builds no dist/ for its exec node dist/server.js. Run the auth server's own dev command instead: sync dependencies, migrate, then watch the TypeScript sources.
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.
Problem
seamless init my-app --local --yes --auth=localscaffolds a stack whose auth service never starts, on both Linux and macOS Docker Desktop:exec ./validateEnvs.sh: permission denied. The script is tracked as mode 644 in seamless-auth-api, so the clone has it at 644, and the./auth:/appbind mount hides the image'sRUN chmod +x ./validateEnvs.sh.chmod +x,Error: Cannot find module '/app/dist/server.js'.Dockerfile.devhas no build step (and.dockerignoreexcludesdist/), soexec node dist/server.jscannot work from a fresh clone, bind mount or not.Fix
The auth service now overrides the entrypoint and runs the same command as the auth server's own
docker-compose.dev.yml:sh ./syncDevDeps.sh, migrations (creating the database on first boot), thennpm run dev:container(tsx watch). The bind mount stays, so edits underauth/still reload. Invoking the scripts throughshmeans file modes no longer matter, so no change to how the source is fetched.Verification
src/generators/docker/docker.test.ts; it fails against the previous generator.npm run buildandnpm test(67 files, 1409 passed, 4 skipped).docker:29-dind, project owned by uid 1001,validateEnvs.shstill 644):docker compose up -d --build db auth, thencurl localhost:5312/health/statusreturns{"message":"System up"}. Logs show the database created on first boot and all migrations applied.