prod: hardened deploy config for srv1289857 — prod container names/ports (frontend :3882, backend :8010, db :5440), Dockerfile.prod (uvicorn --workers 1, init_db race fix), next.config.ts BACKEND_INTERNAL_URL build-arg rewrite, celery worker/beat healthchecks (no-HTTP daemons: inspect ping w/ tmp-file output, /proc cmdline grep; pgrep unavailable in image), pgbouncer removed, restart: unless-stopped

This commit is contained in:
2026-09-20 11:22:20 +05:30
parent 5c6ddcaca0
commit fee57e154b
4 changed files with 166 additions and 120 deletions

View File

@@ -1,8 +1,13 @@
import type { NextConfig } from "next";
// Use NEXT_PUBLIC_API_URL for local dev (http://localhost:8000),
// fall back to the Docker-internal service name for containerised deployments.
const API_BASE = process.env.NEXT_PUBLIC_API_URL || "http://backend:8000";
// Backend URL used for the SERVER-SIDE /api rewrite. Must resolve on the
// Docker network, so it must NOT be a public origin (that would create a loop).
// Use BACKEND_INTERNAL_URL (set at container runtime) so client components can
// independently use NEXT_PUBLIC_API_URL (public origin, baked at build time).
const API_BASE =
process.env.BACKEND_INTERNAL_URL ||
process.env.NEXT_PUBLIC_API_URL ||
"http://backend:8000";
const nextConfig: NextConfig = {
output: "standalone",