All checks were successful
Deploy Canina / deploy (push) Successful in 5m39s
- Backend Dockerfile: add chown for node_modules (Prisma permissions fix) - Frontend Dockerfile: add ARG/ENV for NEXT_PUBLIC_API_URL, VITE_API_URL - nginx.conf: template with __PLACEHOLDERS__ for per-env substitution - deploy.yml: SSH keepalive, sudo for VPN - api.ts: dynamic API URL via env vars instead of hardcoded - next.config.ts: rewrite only in development mode - scripts: deploy.sh, compose.stage.yml, compose.prod.yml
33 lines
614 B
TypeScript
33 lines
614 B
TypeScript
import type { NextConfig } from "next";
|
|
|
|
const nextConfig: NextConfig = {
|
|
images: {
|
|
unoptimized: true,
|
|
remotePatterns: [
|
|
{
|
|
protocol: 'https',
|
|
hostname: '**',
|
|
},
|
|
{
|
|
protocol: 'http',
|
|
hostname: '**',
|
|
},
|
|
],
|
|
},
|
|
async rewrites() {
|
|
// Only proxy /api in development; in production nginx handles it
|
|
if (process.env.NODE_ENV === 'development') {
|
|
return [
|
|
{
|
|
source: '/api/:path*',
|
|
destination: 'http://localhost:4001/api/:path*',
|
|
},
|
|
];
|
|
}
|
|
return [];
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|
|
|