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

21
backend/Dockerfile.prod Normal file
View File

@@ -0,0 +1,21 @@
FROM python:3.11-slim
WORKDIR /app
RUN apt-get update && apt-get install -y \
build-essential \
libpq-dev \
curl \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 8000
HEALTHCHECK --interval=10s --timeout=5s --retries=12 \
CMD curl -f http://localhost:8000/health || exit 1
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "1"]