File size: 2,035 Bytes
ce4bc73 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | # 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:**
```bash
./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:**
```bash
python check_modules.py
```
**In Docker:**
```bash
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:**
```bash
python check_network.py [--bind-test] [--external-test]
```
**In Docker:**
```bash
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:**
```bash
python test_imports.py
```
**In Docker:**
```bash
docker exec omninmo-folio-1 python /app/scripts/test_imports.py
```
## Common Issues
These scripts were created to diagnose the following common issues:
1. **Module Import Errors**: Problems with Python module imports, particularly with the project structure in a Docker container.
2. **Network Binding Issues**: Issues with the application binding to the correct network interface inside the container.
3. **Dependency Problems**: Missing or incompatible dependencies.
## Adding New Scripts
When adding new diagnostic scripts, please follow these guidelines:
1. Include a detailed docstring explaining the purpose of the script
2. Add usage examples, both for local execution and in Docker
3. Make the script executable (`chmod +x script_name.py`)
4. Update this README with information about the new script
|