pnpm i
pnpm dev
copy .env.example .env
pnpm build
pnpm start
构建镜像
docker build --no-cache -t yangtze-app:0.1.0 -f Dockerfile .
# or
docker build --progress=plain --no-cache -t yangtze-app:0.1.0 -f Dockerfile .
# or
docker build --no-cache -t yangtze-app:0.1.0 .
# or
docker build --no-cache . -t yangtze-app:0.1.0
运行镜像
docker run -p 3000:3000 yangtze-app:0.1.0
- FIXME: #issue51477
- FIXME: 生产环境下 /blog 页面报错
暂时解决方案参见 1 和 2
Error: Usage of next-intl APIs in Server Components currently opts into dynamic rendering. This limitation will eventually be lifted, but as a stopgap solution, you can use the `unstable_setRequestLocale` API to enable static rendering, see https://next-intl-docs.vercel.app/docs/getting-started/app-router-server-components#static-rendering at ~/Code/my-opensource/yangtze/.next/server/chunks/3552.js:1:41199 at ~/Code/my-opensource/yangtze/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:185493 ... 5 lines matching cause stack trace ... at eh (~/Code/my-opensource/yangtze/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:134786) at e (~/Code/my-opensource/yangtze/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:137671) at ek (~/Code/my-opensource/yangtze/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:138145) { digest: '569812901', [cause]: n [Error]: Dynamic server usage: Route /zh/blog/next-mdx_tutorial couldn't be rendered statically because it used headers. See more info here: https://nextjs.org/docs/messages/dynamic-server-error at l (~/Code/my-opensource/yangtze/.next/server/chunks/3570.js:1:56076) at d (~/Code/my-opensource/yangtze/.next/server/chunks/6725.js:30:24360) at ~/Code/my-opensource/yangtze/.next/server/chunks/3552.js:1:41101 at ~/Code/my-opensource/yangtze/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:185493 at u (~/Code/my-opensource/yangtze/.next/server/chunks/3552.js:1:41941) at ~/Code/my-opensource/yangtze/.next/server/chunks/3689.js:7:3142 at i (~/Code/my-opensource/yangtze/.next/server/chunks/3689.js:7:3145) at s (~/Code/my-opensource/yangtze/.next/server/chunks/3689.js:7:3933) at O (~/Code/my-opensource/yangtze/.next/server/chunks/4992.js:1:3527) at eh (~/Code/my-opensource/yangtze/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:134786) { description: "Route /zh/blog/next-mdx_tutorial couldn't be rendered statically because it used headers. See more info here: https://nextjs.org/docs/messages/dynamic-server-error", digest: 'DYNAMIC_SERVER_USAGE' } }