8ef43029d5
- generate-config.sh: add --with-nginx flag handling; when enabled, set NEXT_PUBLIC_API_URL empty to use same-origin /api and /socket.io; add BACKEND_INTERNAL_URL for SSR/internal fetch; adjust lan-tls HTTPS (8443) and TLS generation policy - deploy.sh: show only valid access URLs when Nginx is enabled (gateway URLs), avoid misleading :3002/:3001 entries - frontend (env/webrtc): return mutable transports [websocket,polling]; use empty signaling server for same-origin; comments in English - frontend (next.config): support NEXT_IMAGE_UNOPTIMIZED to turn off image optimization in Docker - frontend (health): prefer BACKEND_INTERNAL_URL for internal health checks, fallback to public URL/localhost - docker-compose + Dockerfile(frontend): pass NEXT_IMAGE_UNOPTIMIZED and BACKEND_INTERNAL_URL envs
34 lines
778 B
JavaScript
34 lines
778 B
JavaScript
import createMDX from '@next/mdx'
|
|
|
|
const withMDX = createMDX({
|
|
extension: /\.mdx?$/,
|
|
options: {
|
|
remarkPlugins: [],
|
|
rehypePlugins: [],
|
|
},
|
|
})
|
|
|
|
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],
|
|
images: {
|
|
// Disable optimization inside Docker to avoid container loopback fetch failures (502)
|
|
unoptimized: process.env.NEXT_IMAGE_UNOPTIMIZED === 'true',
|
|
remotePatterns: [
|
|
{
|
|
protocol: 'https',
|
|
hostname: 'img.youtube.com',
|
|
pathname: '/vi/**',
|
|
},
|
|
]
|
|
},
|
|
// 启用standalone输出模式,用于Docker部署
|
|
output: 'standalone',
|
|
// 禁用telemetry
|
|
experimental: {
|
|
instrumentationHook: true,
|
|
},
|
|
}
|
|
|
|
export default withMDX(nextConfig);
|