Diagnostic Scripts
This directory contains diagnostic scripts used to troubleshoot issues with the Folio application, particularly when running in a Docker container.
Available Scripts
run_diagnostics.sh
A shell script that runs all diagnostic scripts on a running Docker container.
Usage:
./run_diagnostics.sh [container_name]
If container_name is not provided, it defaults to "omninmo-folio-1".
check_modules.py
Checks for the availability and versions of Python modules required by the Folio application.
Usage:
python check_modules.py
In Docker:
docker exec omninmo-folio-1 python /app/scripts/check_modules.py
check_network.py
Tests network connectivity from inside a Docker container, including binding to different interfaces and testing external connectivity.
Usage:
python check_network.py [--bind-test] [--external-test]
In Docker:
docker exec omninmo-folio-1 python /app/scripts/check_network.py
test_imports.py
Tests importing various modules used by the Folio application to diagnose import-related issues.
Usage:
python test_imports.py
In Docker:
docker exec omninmo-folio-1 python /app/scripts/test_imports.py
Common Issues
These scripts were created to diagnose the following common issues:
Module Import Errors: Problems with Python module imports, particularly with the project structure in a Docker container.
Network Binding Issues: Issues with the application binding to the correct network interface inside the container.
Dependency Problems: Missing or incompatible dependencies.
Adding New Scripts
When adding new diagnostic scripts, please follow these guidelines:
- Include a detailed docstring explaining the purpose of the script
- Add usage examples, both for local execution and in Docker
- Make the script executable (
chmod +x script_name.py) - Update this README with information about the new script