24 lines
675 B
Docker
24 lines
675 B
Docker
FROM python:3.12-slim
|
|
|
|
WORKDIR /app
|
|
|
|
COPY requirements.txt .
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
gcc libffi-dev libssl-dev python3-dev firebird-dev \
|
|
&& pip install --upgrade pip \
|
|
&& pip install --no-cache-dir -r requirements.txt \
|
|
&& apt-get remove -y gcc \
|
|
&& apt-get autoremove -y \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# ===============================
|
|
# CRIA DIRETÓRIOS NECESSÁRIOS
|
|
# ===============================
|
|
RUN mkdir -p storage/temp
|
|
|
|
COPY . .
|
|
|
|
EXPOSE 8000
|
|
|
|
CMD ["gunicorn","main:app","-k","uvicorn.workers.UvicornWorker","--bind","0.0.0.0:8000","--workers","4","--timeout","120","--graceful-timeout","30","--keep-alive","5","--log-level","info"]
|