canina/frontend/application/next.config.ts
parsa aghaei 501addc909
All checks were successful
Deploy Canina / deploy (push) Successful in 5m39s
fix: CI/CD pipeline, dynamic API URLs, Dockerfile fixes
- 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
2026-07-28 16:37:05 +03:30

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;