🚀 Auto-deploy: BotVPS atualizado em 27/03/2026 21:38:16

This commit is contained in:
2026-03-27 21:38:16 +00:00
parent 43332e6c06
commit b2904a2f9f
3 changed files with 5 additions and 4 deletions

View File

@@ -12,7 +12,7 @@ load_dotenv()
# Configurações obtidas do .env
TOKEN = os.getenv("TELEGRAM_BOT_TOKEN")
ALLOWED_USER_ID = os.getenv("TELEGRAM_CHAT_ID")
API_BASE_URL = "http://localhost:8000"
API_BASE_URL = "http://localhost:8001"
# O ID permitido deve ser comparado como string ou int, padronizando aqui
if ALLOWED_USER_ID:

View File

@@ -2,11 +2,11 @@ module.exports = {
apps: [
{
name: "botvps-api",
script: "/usr/local/bin/uvicorn",
args: "main:app --host 0.0.0.0 --port 8000",
script: "main.py",
interpreter: "python3",
cwd: "/root/Apps/BotVPS",
env: {
PORT: "8001",
NODE_ENV: "production",
},
restart_delay: 3000

View File

@@ -203,4 +203,5 @@ async def get_orch_status(is_auth: bool = Depends(verify_password)):
# --- SERVER ---
if __name__ == "__main__":
import uvicorn
uvicorn.run("main:app", host="0.0.0.0", port=8000, reload=True)
port = int(os.getenv("PORT", 8001))
uvicorn.run("main:app", host="0.0.0.0", port=port, reload=True)