From ac1a7cfba255961fcc4a556ea8e460559e49c8d3 Mon Sep 17 00:00:00 2001 From: HRiggs Date: Fri, 5 Dec 2025 23:47:18 -0500 Subject: [PATCH] update timeout --- DOCKER_DEPLOYMENT.md | 47 ++++++++++++++++++++++++++++++++++++++++++++ Dockerfile | 3 ++- 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/DOCKER_DEPLOYMENT.md b/DOCKER_DEPLOYMENT.md index 9a85e2c..e51e073 100644 --- a/DOCKER_DEPLOYMENT.md +++ b/DOCKER_DEPLOYMENT.md @@ -86,18 +86,65 @@ docker-compose down -v ## Troubleshooting +### Viewing Portainer Deployment Logs + +**Option 1: Stack Logs** +1. Go to **Stacks** in Portainer +2. Click on your `basharbot` stack +3. Look for deployment output at the bottom of the page + +**Option 2: Container Logs** +1. Go to **Containers** in Portainer +2. Find the `basharbot` container +3. Click on it and select **Logs** +4. Use the search/filter to find errors + +**Option 3: CLI Access** +```bash +# View deployment logs +docker-compose logs basharbot + +# Follow logs in real-time +docker logs -f basharbot + +# View last 100 lines +docker logs --tail 100 basharbot + +# Check build logs +docker-compose build --no-cache +``` + +### Common Issues + +**Build timeout / "No space left on device":** +- TTS library is large (~500MB with dependencies) +- Increase Docker build timeout in Portainer +- Or disable Arabic TTS: Set `USE_ARABIC_TTS=false` in .env + **Bot won't start:** - Check logs: `docker-compose logs basharbot` - Verify DISCORD_TOKEN is set correctly in .env +- Check for Python import errors in logs **Audio issues:** - Ensure ffmpeg is installed in container (included in Dockerfile) - Check opus library is available +- Verify voice permissions in Discord **High memory usage:** - Use smaller Whisper model: `WHISPER_MODEL_SIZE=tiny` +- Disable Arabic TTS: `USE_ARABIC_TTS=false` - Reduce model compute type in stt.py +**Packet loss warnings:** +- These are normal and suppressed in logs +- Don't affect functionality + +**TTS model download fails:** +- First run downloads ~50MB Arabic model +- Ensure container has internet access +- Check `/root/.local/share/tts/` volume + ## Updates To update the bot: diff --git a/Dockerfile b/Dockerfile index 696a45d..521490f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,8 @@ WORKDIR /app COPY requirements.txt . # Install Python dependencies -RUN pip install --no-cache-dir -r requirements.txt +# Increase pip timeout for large packages like TTS +RUN pip install --no-cache-dir --timeout=1000 -r requirements.txt # Copy application files COPY bot.py .