Debug
This commit is contained in:
parent
70b7757b5a
commit
d2954b6691
1 changed files with 9 additions and 28 deletions
37
Dockerfile
37
Dockerfile
|
|
@ -2,42 +2,23 @@ FROM python:3.12-slim
|
|||
|
||||
WORKDIR /app
|
||||
|
||||
# Instala dependências do sistema, incluindo nano e curl
|
||||
RUN apt-get update && apt-get install -y \
|
||||
gcc \
|
||||
libffi-dev \
|
||||
libssl-dev \
|
||||
python3-dev \
|
||||
firebird-dev \
|
||||
libcurl4-openssl-dev \
|
||||
nano \
|
||||
curl \
|
||||
&& pip install --upgrade pip \
|
||||
&& apt-get clean
|
||||
|
||||
COPY requirements.txt .
|
||||
|
||||
# Instala as dependências do Python
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Remove o GCC para reduzir o tamanho da imagem, mas mantém bibliotecas de runtime
|
||||
RUN apt-get remove -y gcc \
|
||||
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
|
||||
# ===============================
|
||||
# CRIA DIRETÓRIOS NECESSÁRIOS
|
||||
# ===============================
|
||||
RUN mkdir -p storage/temp
|
||||
|
||||
COPY . .
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
# Usando o formato Shell para evitar erros de interpretação no Easypanel
|
||||
CMD gunicorn main:app \
|
||||
--workers 4 \
|
||||
--worker-class uvicorn.workers.UvicornWorker \
|
||||
--bind 0.0.0.0:8000 \
|
||||
--timeout 120 \
|
||||
--graceful-timeout 30 \
|
||||
--keep-alive 5 \
|
||||
--log-level info
|
||||
CMD ["gunicorn", "main:app", "-w", "4", "-k", "uvicorn.workers.UvicornWorker", "--bind", "0.0.0.0:8000"]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue