fix: use script start.sh and add proc management tools
This commit is contained in:
@@ -6,6 +6,8 @@ RUN apt-get update && apt-get install -y \
|
|||||||
gcc \
|
gcc \
|
||||||
python3-dev \
|
python3-dev \
|
||||||
docker.io \
|
docker.io \
|
||||||
|
procps \
|
||||||
|
psmisc \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
@@ -18,8 +20,8 @@ COPY . .
|
|||||||
# Expõe a porta do FastAPI
|
# Expõe a porta do FastAPI
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
|
|
||||||
# Script de inicialização (Roda a API web no background e o Telegram Bot polling)
|
# Garante que o script de inicialização do repositório tenha permissão de execução
|
||||||
RUN echo '#!/bin/bash\nuvicorn main:app --host 0.0.0.0 --port 8000 & \npython bot_logic.py\n' > start.sh
|
|
||||||
RUN chmod +x start.sh
|
RUN chmod +x start.sh
|
||||||
|
|
||||||
CMD ["./start.sh"]
|
CMD ["./start.sh"]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user