669addf799
Build and Push Reader Image / docker (push) Failing after 22s
- Introduced a new batch import client for handling multiple EPUB files simultaneously. - Updated API routes for previewing and importing EPUB files, improving error handling and response management. - Enhanced genre management during import, allowing for dynamic creation and association of genres. - Implemented long-fetch handling to accommodate lengthy processing times for large EPUB files. - Refined UI components for better user experience in the import workflow.
54 lines
1.4 KiB
JavaScript
54 lines
1.4 KiB
JavaScript
import path from "node:path"
|
|
import { fileURLToPath } from "node:url"
|
|
|
|
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
|
|
/** @type {import('next').NextConfig} */
|
|
const readerApiOrigin = (process.env.READER_API_ORIGIN || "http://localhost:8000").replace(/\/+$/, "")
|
|
|
|
const nextConfig = {
|
|
// Tránh Turbopack suy luận sai root (lỗi: tìm next từ `reader/app` → dev server exit 1).
|
|
turbopack: {
|
|
root: __dirname,
|
|
},
|
|
output: "standalone",
|
|
typescript: {
|
|
ignoreBuildErrors: true,
|
|
},
|
|
images: {
|
|
unoptimized: true,
|
|
},
|
|
async rewrites() {
|
|
return {
|
|
beforeFiles: [
|
|
{
|
|
source: "/api/genres",
|
|
destination: `${readerApiOrigin}/api/genres`,
|
|
},
|
|
{
|
|
source: "/api/novels/:path*",
|
|
destination: `${readerApiOrigin}/api/novels/:path*`,
|
|
},
|
|
{
|
|
source: "/api/chapters/:path*",
|
|
destination: `${readerApiOrigin}/api/chapters/:path*`,
|
|
},
|
|
{
|
|
source: "/api/auth/mobile-login",
|
|
destination: `${readerApiOrigin}/api/auth/mobile-login`,
|
|
},
|
|
{
|
|
source: "/api/health",
|
|
destination: `${readerApiOrigin}/api/health`,
|
|
},
|
|
{
|
|
source: "/api/dev/:path*",
|
|
destination: `${readerApiOrigin}/api/dev/:path*`,
|
|
},
|
|
],
|
|
}
|
|
},
|
|
}
|
|
|
|
export default nextConfig
|