Files
honeyDueAPI/.dockerignore
T
Trey t 082b5fd3cd Fix admin URL baking: bake NEXT_PUBLIC_API_URL at Docker build time
Next.js bakes NEXT_PUBLIC_* vars into the client JS bundle at build
time, not runtime. The admin image was being built with
admin/.env.local containing NEXT_PUBLIC_API_URL=http://localhost:8000,
hardcoding localhost into the browser bundle. The runtime configMap
value had no effect on the already-compiled JS, causing prod admin
login to throw CORS errors hitting localhost.

Fix:
- Dockerfile: admin-builder stage accepts ARG NEXT_PUBLIC_API_URL and
  strips any committed .env.local/.env.development.local before
  npm run build.
- .dockerignore: explicitly exclude admin/.env.* (root-level .env.*
  pattern doesn't match nested paths), so a local dev .env.local can
  never sneak into the build context again.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 10:10:53 -05:00

60 lines
870 B
Plaintext

# Git
.git
.gitignore
.gitattributes
.github
.gitea
# Deploy inputs (never bake into images)
deploy/*.env
deploy/secrets/*.txt
deploy/secrets/*.p8
deploy/scripts/
# Local env files — dockerignore patterns apply from the context root, so
# the explicit admin/ line is needed to catch admin/.env.local (which would
# otherwise bake NEXT_PUBLIC_API_URL=http://localhost:8000 into the bundle).
.env
.env.*
admin/.env
admin/.env.*
!.env.example
!admin/.env.example
# Node (admin)
admin/node_modules
admin/.next
admin/out
admin/.turbo
admin/.vercel
admin/npm-debug.log*
# Go build artifacts
bin/
dist/
tmp/
*.test
*.out
coverage.out
coverage.html
# Tooling / editor
.vscode
.idea
*.swp
*.swo
.DS_Store
# Logs
*.log
logs/
# Tests / docs (not needed at runtime)
docs/
*.md
!README.md
# CI/compose locals (not needed for swarm image build)
docker-compose*.yml
Makefile