Skip to content

fix(init): start the source-built auth server without the image entrypoint - #294

Merged
Bccorb merged 1 commit into
mainfrom
fix/local-auth-compose
Oct 21, 2026
Merged

Bccorb merged 1 commit into
mainfrom
fix/local-auth-compose

Conversation

@Bccorb

@Bccorb Bccorb commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Problem

seamless init my-app --local --yes --auth=local scaffolds a stack whose auth service never starts, on both Linux and macOS Docker Desktop:

  1. 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:/app bind mount hides the image's RUN chmod +x ./validateEnvs.sh.
  2. After a manual chmod +x, Error: Cannot find module '/app/dist/server.js'. Dockerfile.dev has no build step (and .dockerignore excludes dist/), so exec node dist/server.js cannot 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), then npm run dev:container (tsx watch). The bind mount stays, so edits under auth/ still reload. Invoking the scripts through sh means file modes no longer matter, so no change to how the source is fetched.

Verification

  • New unit test in src/generators/docker/docker.test.ts; it fails against the previous generator.
  • npm run build and npm test (67 files, 1409 passed, 4 skipped).
  • Linux (docker:29-dind, project owned by uid 1001, validateEnvs.sh still 644): docker compose up -d --build db auth, then curl localhost:5312/health/status returns {"message":"System up"}. Logs show the database created on first boot and all migrations applied.
  • macOS Docker Desktop: reproduced both original errors with the previous auth block, then the fixed block came up healthy.

…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.
@Bccorb Bccorb added the v0.19 Targets the v0.19 release label Oct 21, 2026
@Bccorb
Bccorb merged commit fa79946 into main Oct 21, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v0.19 Targets the v0.19 release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant