Add Docker support (standalone Next.js output)

Multi-stage Dockerfile producing a minimal runtime image via
next.config.ts's output:"standalone". NEXT_PUBLIC_API_URL is taken as
a build arg since it gets baked into the client bundle at build time.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-16 00:01:26 +03:30
parent 93f6ea2f07
commit 501fa294f4
3 changed files with 44 additions and 1 deletions
+2 -1
View File
@@ -1,7 +1,8 @@
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
/* config options here */
// برای build خروجی مستقل (بدون نیاز به node_modules کامل) — لازم برای ایمیج Docker سبک
output: "standalone",
};
export default nextConfig;