21 lines
460 B
Text
21 lines
460 B
Text
FROM git.urec56.ru/urec/python:3.12-alpine
|
|
|
|
RUN addgroup -S app && adduser -S app -G app
|
|
|
|
ENV APP_HOME=/home/app
|
|
|
|
WORKDIR $APP_HOME
|
|
|
|
COPY requirements.txt .
|
|
|
|
RUN uv pip install --no-cache-dir --system -r requirements.txt
|
|
|
|
COPY . .
|
|
|
|
RUN chown -R app:app $APP_HOME
|
|
|
|
USER app
|
|
|
|
CMD ["gunicorn", "app.main:app", "--workers", "2", "--worker-class", "uvicorn.workers.UvicornWorker",\
|
|
"--bind=0.0.0.0:8000", "--max-requests", "10000", "--max-requests-jitter", "20"]
|
|
|