progressively working deploy scenario
This commit is contained in:
+3
-2
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user