Self-host Next.js on containers: standalone output Dockerfile, build-time vs runtime env vars, image optimization, NextAuth, caching, and ISR.