c82f887a02
Add multi-platform Docker image build (amd64 + arm64) with GitHub Actions CI that pushes to GHCR on every merge to main. Users can self-host with a single `docker compose up -d` command. - Dockerfile: multi-stage build with Next.js standalone output (~150-200MB) - docker-compose.yml: one-command self-hosted deployment - .github/workflows/docker.yml: CI workflow with QEMU cross-compilation - next.config.ts: conditional `output: "standalone"` via BUILD_STANDALONE env - README (zh/en/ja): restructure deploy section to include Docker option Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
24 lines
620 B
TypeScript
24 lines
620 B
TypeScript
import type { NextConfig } from "next";
|
|
|
|
const config: NextConfig = {
|
|
output: process.env.BUILD_STANDALONE === "true" ? "standalone" : undefined,
|
|
reactStrictMode: true,
|
|
typedRoutes: false,
|
|
turbopack: {
|
|
root: __dirname,
|
|
},
|
|
// /public defaults to `max-age=0, must-revalidate`; pin the stable /home/* covers + first-act JSON for 1y so browsers/CDN stop re-downloading them.
|
|
async headers() {
|
|
return [
|
|
{
|
|
source: "/home/:path*",
|
|
headers: [
|
|
{ key: "Cache-Control", value: "public, max-age=31536000, immutable" },
|
|
],
|
|
},
|
|
];
|
|
},
|
|
};
|
|
|
|
export default config;
|