The frontend is documented as a single image whose AUTH_MODE env var selects local vs Clerk auth per deployment (docs/clerk.md). But the root layout and /login read AUTH_MODE during render with no request-time signal, so Next 16 statically prerendered them at build time in the build host's mode (local). The deployed image then served the local login form forever, ignoring AUTH_MODE=clerk at runtime — ClerkProvider and <SignIn/> never appeared. Add `await connection()` (the v16 way to read env at request time) in the layout's IdentityProvider and in /login so both render per-request and honor the runtime AUTH_MODE. Also add a root .dockerignore: the repo had none, so every image build shipped the 67GB Rust target/ dir as build context. Co-Authored-By: Claude Opus 4.8 <[email protected]>
24 lines
394 B
Plaintext
24 lines
394 B
Plaintext
# Build artifacts and dependencies — never belong in an image build context.
|
|
# Without this, the 67GB Rust target/ dir is sent as context on every build.
|
|
|
|
# Rust
|
|
target/
|
|
**/target/
|
|
|
|
# Node — reinstalled (npm ci) / regenerated (next build) inside the image
|
|
node_modules/
|
|
**/node_modules/
|
|
.next/
|
|
**/.next/
|
|
|
|
# VCS & editor
|
|
.git/
|
|
.gitignore
|
|
.vscode/
|
|
.idea/
|
|
|
|
# Local artifacts
|
|
*.tar
|
|
*.log
|
|
*.bak
|