docs: Add Docker Compose instructions to README
Browse filesAdds a new section to the README.md detailing how to install and use the LogViewer application with Docker Compose, including prerequisites, build/run steps, CLI usage considerations, and how to stop the services.
README.md
CHANGED
|
@@ -51,6 +51,42 @@ To set up LogViewer on your local machine, follow these steps:
|
|
| 51 |
|
| 52 |
## Usage
|
| 53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
### Web Interface (Gradio App)
|
| 55 |
|
| 56 |
To launch the interactive web interface:
|
|
|
|
| 51 |
|
| 52 |
## Usage
|
| 53 |
|
| 54 |
+
### Running with Docker Compose
|
| 55 |
+
|
| 56 |
+
Docker Compose provides an easy way to set up and run the LogViewer application in a containerized environment.
|
| 57 |
+
|
| 58 |
+
#### Prerequisites
|
| 59 |
+
|
| 60 |
+
* Docker and Docker Compose installed on your system.
|
| 61 |
+
|
| 62 |
+
#### Steps
|
| 63 |
+
|
| 64 |
+
1. **Build and run the services:**
|
| 65 |
+
Navigate to the root directory of the cloned repository and run:
|
| 66 |
+
```bash
|
| 67 |
+
docker compose up --build -d
|
| 68 |
+
```
|
| 69 |
+
This command builds the Docker image (if not already built) and starts the LogViewer service in detached mode.
|
| 70 |
+
|
| 71 |
+
2. **Access the Web UI:**
|
| 72 |
+
Open your web browser and navigate to `http://localhost:7860`.
|
| 73 |
+
|
| 74 |
+
3. **Using the CLI with Docker Compose:**
|
| 75 |
+
If you are running the web interface via Docker Compose, the CLI tool (`cli_app.py`) needs to connect to the Dockerized service. You will need to modify the `Client` URL in `cli_app.py` to point to the Docker container's exposed port (which is `http://localhost:7860` by default).
|
| 76 |
+
|
| 77 |
+
Locate the line `client = Client("http://localhost:7860/")` in `cli_app.py` and ensure it points to the correct address where your Docker container is accessible.
|
| 78 |
+
|
| 79 |
+
Then, you can run the CLI as usual:
|
| 80 |
+
```bash
|
| 81 |
+
python cli_app.py <log_file_path> <filter_file_path> [-o <output_file_path>]
|
| 82 |
+
```
|
| 83 |
+
|
| 84 |
+
4. **Stopping the services:**
|
| 85 |
+
To stop the running Docker containers, use:
|
| 86 |
+
```bash
|
| 87 |
+
docker compose down
|
| 88 |
+
```
|
| 89 |
+
|
| 90 |
### Web Interface (Gradio App)
|
| 91 |
|
| 92 |
To launch the interactive web interface:
|