To run pyTMBot in DEBUG mode, follow these steps:
If the pyTMBot container is currently running, you need to stop it first:
sudo docker stop pytmbot
Once the container is stopped, remove it:
sudo docker rm pytmbot
Launch the pyTMBot container in DEBUG mode by executing the following command:
sudo docker run -d \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-v /root/pytmbot.yaml:/opt/app/pytmbot.yaml:ro \
--env TZ="Asia/Yekaterinburg" \
--restart=always \
--name=pytmbot \
--pid=host \
--security-opt=no-new-privileges \
orenlab/pytmbot:latest \
--log-level DEBUG --mode prod
--log-level DEBUG
: Sets the logging level to DEBUG, providing detailed information for troubleshooting--mode prod
: Specifies the production mode for the botDEBUG
, INFO
, ERROR
dev
, prod
--plugins monitor,outline
: Load specific plugins--webhook True
: Enable webhook mode--socket_host 0.0.0.0
: Set host for webhook modeTo view the logs for the pyTMBot container, use the following command:
sudo docker logs pytmbot
For real-time log monitoring:
sudo docker logs -f pytmbot
This will display the log output for the bot, including detailed DEBUG information.
For development purposes, you can also run the bot in development mode with debug logging:
sudo docker run -d \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-v /root/pytmbot.yaml:/opt/app/pytmbot.yaml:ro \
--env TZ="Asia/Yekaterinburg" \
--restart=always \
--name=pytmbot \
--pid=host \
--security-opt=no-new-privileges \
orenlab/pytmbot:latest \
--log-level DEBUG --mode dev
Before running in DEBUG mode, you can perform health checks:
# Health check
sudo docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-v /root/pytmbot.yaml:/opt/app/pytmbot.yaml:ro \
orenlab/pytmbot:latest \
--health_check
# Docker configuration check
sudo docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
orenlab/pytmbot:latest \
--check-docker
Important: DEBUG mode may contain sensitive information in logs. Use it only for troubleshooting and never in production environments where logs might be exposed.
If you encounter issues:
sudo docker run --rm orenlab/pytmbot:latest --check-docker
sudo docker run --rm -v /root/pytmbot.yaml:/opt/app/pytmbot.yaml:ro orenlab/pytmbot:latest --health_check
sudo docker logs pytmbot
For additional help, refer to the full CLI arguments documentation.