refactor: Reorganize files into a 'logviewer' directory
Browse filesMoved Python source files into a subdirectory to improve project structure and scalability. Updated Dockerfile and launch.sh to reflect the new file paths and made launch.sh more portable.
Dockerfile
CHANGED
|
@@ -20,4 +20,4 @@ EXPOSE 7860
|
|
| 20 |
ENV GRADIO_SERVER_NAME="0.0.0.0"
|
| 21 |
|
| 22 |
# Run app.py when the container launches
|
| 23 |
-
CMD ["python", "app.py"]
|
|
|
|
| 20 |
ENV GRADIO_SERVER_NAME="0.0.0.0"
|
| 21 |
|
| 22 |
# Run app.py when the container launches
|
| 23 |
+
CMD ["python", "logviewer/app.py"]
|
launch.sh
CHANGED
|
@@ -1,3 +1,13 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
+
# This script is used to launch the LogViewer application.
|
| 3 |
+
|
| 4 |
+
# It is recommended to create and activate a virtual environment before running.
|
| 5 |
+
# For example:
|
| 6 |
+
# python -m venv .venv
|
| 7 |
+
# source .venv/bin/activate
|
| 8 |
+
|
| 9 |
+
# Get the directory where this script is located.
|
| 10 |
+
SCRIPT_DIR=$(dirname -- "$0")
|
| 11 |
+
|
| 12 |
+
# Run the main application file.
|
| 13 |
+
python "$SCRIPT_DIR/logviewer/app.py"
|
logviewer/__init__.py
ADDED
|
File without changes
|
app.py β logviewer/app.py
RENAMED
|
File without changes
|
cli_app.py β logviewer/cli_app.py
RENAMED
|
File without changes
|
filter_utils.py β logviewer/filter_utils.py
RENAMED
|
File without changes
|
timestamp_utils.py β logviewer/timestamp_utils.py
RENAMED
|
File without changes
|