deploy(Dockerfile): Ajusta o dockerfile para deploy

This commit is contained in:
Keven 2025-12-09 09:40:36 -03:00
parent ea1c830010
commit 8d444c968e
2 changed files with 14 additions and 22 deletions

View file

@ -46,11 +46,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends curl nano \
# Expõe a porta padrão do app
EXPOSE 8000
# ==============================
# HEALTHCHECK automático
# ==============================
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD curl -f http://localhost:8000/health || exit 1
# # ==============================
# # HEALTHCHECK automático
# # ==============================
# HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
# CMD curl -f http://localhost:8000/health || exit 1
# ==============================
# Comando de inicialização

View file

@ -1,24 +1,16 @@
@echo off
setlocal
echo ============================================
echo Limpando pastas __pycache__ ...
echo ============================================
echo ===============================
echo 🧹 Limpando cache do Python (somente raiz)
echo ===============================
REM Remove pastas __pycache__ e .pytest_cache na raiz
for %%i in (__pycache__ .pytest_cache) do (
for /d /r %%i in (__pycache__) do (
if exist "%%i" (
echo Removendo diretório %%i ...
rmdir /s /q "%%i"
echo Removendo: %%i
rd /s /q "%%i"
)
)
REM Remove arquivos .pyc na raiz
for %%f in (*.pyc) do (
echo Removendo arquivo %%f ...
del /q "%%f"
)
echo ✅ Cache do Python limpo com sucesso!
endlocal
echo.
echo ✔ Processo concluído!
echo ============================================
pause