Skip to content

Simplify setup#4

Open
tung2744 wants to merge 19 commits into
authgear:mainfrom
tung2744:DEV-3542
Open

Simplify setup#4
tung2744 wants to merge 19 commits into
authgear:mainfrom
tung2744:DEV-3542

Conversation

@tung2744

Copy link
Copy Markdown
Contributor

ref DEV-3542

tung2744 and others added 16 commits June 16, 2026 17:04
Access auth at http://localhost:3100 and portal at http://localhost:8010
without needing /etc/hosts edits.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add migrate and migrate-portal services that run all DB migrations
after postgres is healthy. authgear/authgear-portal services wait for
migrations to complete before starting.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add minio-init service that creates images and userexport buckets using
--ignore-existing, making it safe to run on every startup. authgear and
authgear-images wait for minio-init to complete before starting.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Services are now ordered: Infrastructure → Init → Application.
migrate -> init-migrate
migrate-portal -> init-migrate-portal
minio-init -> init-minio

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Automates authgear init, config upload, domain setup, admin user
creation, and collaborator grant. Credentials configurable via
ADMIN_EMAIL / ADMIN_PASSWORD env vars.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
mc alias set doesn't validate credentials so it always reports success,
but then mc mb fails. MC_HOST_local sets the alias reliably without
needing a separate alias set command.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add resolver 127.0.0.11 and use set $upstream variables so nginx
defers DNS resolution to request time instead of startup. This allows
nginx to start before the app containers are ready.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
authgear-portal domain create-default requires a dot-prefixed suffix
with no port number. The domain model is {app-id}.localhost; the port
is nginx's concern. Modern browsers resolve *.localhost natively per
RFC 6761, so no hosts file edits are needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The Host header must be accounts.localhost:3100 so authgear can look
up the correct app. Using localhost:3100 returns 404 app not found.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
docker compose run re-runs all init dependencies and mixes their output
with the command stdout, causing JSON parse failures. exec runs directly
in the already-running authgear container with clean stdout. -T disables
TTY allocation which can interfere with output capture in a subshell.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add domain create-custom to register localhost as a custom domain for
the accounts app, so auth is accessible at localhost:3100 without a
subdomain. Update AUTHGEAR_ENDPOINT and public-origin accordingly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
setup.sh now checks accounts/ is empty before proceeding, preventing
accidental overwrites. Users must rm -rf accounts to re-run setup.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
accounts/ is now gitignored and setup.sh creates it with mkdir -p.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
tung2744 and others added 3 commits June 17, 2026 12:18
Auth is now accessible at localhost:3100 directly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@tung2744

Copy link
Copy Markdown
Contributor Author

Also added warning in this repo to emphasise it is non-production use

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants