fix(0933): Ajuste do dockerfile
This commit is contained in:
parent
bd8f433846
commit
6ccf74e687
1 changed files with 6 additions and 8 deletions
14
Dockerfile
14
Dockerfile
|
|
@ -1,13 +1,9 @@
|
|||
# Usa a imagem oficial do Python
|
||||
FROM python:3.12-slim
|
||||
|
||||
# Define diretório de trabalho no container
|
||||
WORKDIR /app
|
||||
|
||||
# Copia o arquivo de dependências
|
||||
COPY requirements.txt .
|
||||
|
||||
# Instala dependências no sistema e no Python
|
||||
RUN apt-get update && apt-get install -y \
|
||||
gcc libffi-dev libssl-dev python3-dev firebird-dev \
|
||||
&& pip install --upgrade pip \
|
||||
|
|
@ -16,11 +12,13 @@ RUN apt-get update && apt-get install -y \
|
|||
&& apt-get autoremove -y \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copia o restante do projeto para o container
|
||||
# ===============================
|
||||
# CRIA DIRETÓRIOS NECESSÁRIOS
|
||||
# ===============================
|
||||
RUN mkdir -p storage/temp
|
||||
|
||||
COPY . .
|
||||
|
||||
# Expõe a porta padrão do Uvicorn/FastAPI
|
||||
EXPOSE 8000
|
||||
|
||||
# Comando para iniciar o servidor
|
||||
CMD ["sh", "-c", "uvicorn main:app --host 0.0.0.0 --port 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"]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue