progressively working deploy scenario

This commit is contained in:
2026-06-19 19:17:22 +00:00
parent 2d2b2d040b
commit c4cc268ea8
14 changed files with 125 additions and 72 deletions
+3 -2
View File
@@ -2,11 +2,12 @@ FROM docker.io/library/python:3.12-slim AS base
WORKDIR /app
RUN pip install --no-cache-dir gunicorn uvicorn psycopg2-binary
ENV PYTHONUNBUFFERED=1
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "2"]
EXPOSE 8000
CMD ["gunicorn", "app.main:app", "-k", "uvicorn.workers.UvicornWorker", "-b", "0.0.0.0:8000", "--workers", "2", "--timeout", "120"]