apps/web was never deployed, so /billing on the public domain returned the landing page and d3ro.dev (desktop "upgrade") did not resolve. - apps/web runs with basePath /app and output standalone; /download and /releases redirect to the site's #download. A Dockerfile and a d3ro-web compose service (port 3002) deploy it to the NAS with the other images. - The site bridge worker forwards /app/* to WEB_APP_ORIGIN (the tunnel host) and rewrites upstream redirects; everything else still goes to Pages. With no origin configured /app answers 503 instead of the landing page. - Desktop upgrade, desktop Stripe return, mobile subscription management, the web checkout/portal returns and the site all use billingUrl(); the return query is success=1 / canceled=1, which the billing page reads. The billing page highlights ?tier=pro|pro_plus, and signing in from a billing link returns to the same plan. - auth/callback pins the redirect origin in production and rejects protocol-relative next= values (open redirect). - Mobile legal links use SITE_URLS (fixes the missing slash on /terms). - Compose drops the unused NEXT_PUBLIC_API_URL and the dead wwwroot legal mounts; deploy scripts add the web image and the SUPABASE_* values the NAS compose already required; .dockerignore keeps app .env files out of images. - Supabase auth redirects allow /app/** (remote dashboard must match). Policy: docs/REFACTOR_POLICY.md Wave 3, W3-3 and W3-4.
26 lines
1.1 KiB
TypeScript
26 lines
1.1 KiB
TypeScript
import type { NextConfig } from 'next'
|
|
import { SITE_URLS, WEB_APP_BASE_PATH } from '@d3ro/core/web-urls'
|
|
|
|
const nextConfig: NextConfig = {
|
|
reactStrictMode: true,
|
|
// 웹앱은 d3ro.chanpaca.net/app 아래에서 서빙된다. 사이트 브리지 워커가 /app/* 를 이 서버로 보낸다.
|
|
basePath: WEB_APP_BASE_PATH,
|
|
// NAS Docker 이미지(apps/web/Dockerfile)는 standalone 산출물만 복사한다.
|
|
output: 'standalone',
|
|
// monorepo workspace 패키지는 소스 TypeScript 그대로 번들 대상
|
|
transpilePackages: ['@d3ro/core', '@d3ro/ui', '@d3ro/i18n', '@d3ro/api-client'],
|
|
experimental: {
|
|
// MUI + Emotion 최적화
|
|
optimizePackageImports: ['@mui/material', '@mui/icons-material', '@d3ro/ui']
|
|
},
|
|
async redirects() {
|
|
// 다운로드·릴리스 안내는 랜딩 사이트 한 벌만 둔다. source 는 basePath 가 붙어 /app/download, /app/releases(/…) 가 된다.
|
|
return ['/download', '/releases/:path*'].map((source) => ({
|
|
source,
|
|
destination: SITE_URLS.download,
|
|
permanent: true
|
|
}))
|
|
}
|
|
}
|
|
|
|
export default nextConfig
|