migration to rustfs

This commit is contained in:
Ivan Rezchikov
2026-11-14 14:33:14 +03:00
parent 8eefce6534
commit 04da7c325b
12 changed files with 640 additions and 705 deletions
+14 -10
View File
@@ -1,22 +1,26 @@
import type { NextConfig } from "next";
const minioHost = process.env.MINIO_PUBLIC_URL ? new URL(process.env.MINIO_PUBLIC_URL).hostname : "localhost";
const minioPort = process.env.MINIO_PUBLIC_URL ? new URL(process.env.MINIO_PUBLIC_URL).port : undefined;
const publicUrl = process.env.RUSTFS_PUBLIC_URL ? new URL(process.env.RUSTFS_PUBLIC_URL) : null;
const nextConfig: NextConfig = {
images: {
remotePatterns: [
{
hostname: minioHost,
...(minioPort ? { port: minioPort } : {}),
},
],
remotePatterns: publicUrl
? [
{
protocol: publicUrl.protocol === "https:" ? "https" : "http",
hostname: publicUrl.hostname,
...(publicUrl.port ? { port: publicUrl.port } : {}),
pathname: `/${process.env.RUSTFS_BUCKET ?? "uploads"}/**`,
},
]
: [],
},
experimental: {
serverActions: {
bodySizeLimit: "5mb",
bodySizeLimit: "6mb",
},
},
output: "standalone",
};
export default nextConfig;
export default nextConfig;