|
diff --git a/README.md b/README.md index 1467530..952e6d2 100644 --- a/ README.md+++ b/ README.md |
| @@ -1,14 +1,6 @@ |
| 1 | # Bonsai Web |
1 | # Bonsai Web |
| 2 | |
2 | |
| 3 | A simple web interface for the Bonsai network latency graph generator. |
3 | A simple web interface for the Bonsai. |
| 4 | |
| |
| 5 | ## Features |
| |
| 6 | |
| |
| 7 | - Clean, modern UI using Pico CSS |
| |
| 8 | - YAML configuration input |
| |
| 9 | - Real-time file generation |
| |
| 10 | - File viewing and downloading capabilities |
| |
| 11 | - Containerized deployment support |
| |
| 12 | |
4 | |
| 13 | ## Local Development |
5 | ## Local Development |
| 14 | |
6 | |
| @@ -68,69 +60,24 @@ For development, the application includes fallback dummy data generation when `B |
| 68 | |
60 | |
| 69 | ### Building the Container |
61 | ### Building the Container |
| 70 | |
62 | |
| 71 | #### Local Build (for testing) |
| |
| 72 | ```bash |
| |
| 73 | ./build.sh |
| |
| 74 | ``` |
| |
| 75 | |
| |
| 76 | #### Production Build and Push |
| |
| 77 | ```bash |
63 | ```bash |
| 78 | PUSH=1 ./build.sh |
64 | just build |
| |
65 | # or `just --set image <custom image> build` |
| 79 | ``` |
66 | ``` |
| 80 | |
67 | |
| 81 | The build script will: |
68 | #### Pushing the container |
| 82 | - Always build the container image with appropriate tags |
| |
| 83 | - Only push to `git.d464.sh/diogo464/bonsai-web` when `PUSH=1` is set |
| |
| 84 | - Use git tags for versioning (or 'latest' if no tag) |
| |
| 85 | - Check registry authentication only when pushing |
| |
| 86 | |
| |
| 87 | #### Manual Build Commands |
| |
| 88 | |
69 | |
| 89 | ```bash |
70 | ```bash |
| 90 | # Local build |
71 | just push |
| 91 | podman build -t bonsai-web -f Containerfile . |
72 | # or `just --set image <custom image> push` |
| 92 | |
| |
| 93 | # Production build and push |
| |
| 94 | podman build -t git.d464.sh/diogo464/bonsai-web:latest -f Containerfile . |
| |
| 95 | podman push git.d464.sh/diogo464/bonsai-web:latest |
| |
| 96 | ``` |
73 | ``` |
| 97 | |
74 | |
| 98 | ### Running the Container |
75 | ### Running the Container |
| 99 | |
76 | |
| 100 | #### From Local Build |
| |
| 101 | ```bash |
| |
| 102 | podman run -p 5000:5000 bonsai-web:local |
| |
| 103 | ``` |
| |
| 104 | |
| |
| 105 | #### From Registry |
| |
| 106 | ```bash |
77 | ```bash |
| 107 | podman run -p 5000:5000 git.d464.sh/diogo464/bonsai-web:latest |
78 | podman run -p 5000:5000 git.d464.sh/diogo464/bonsai-web:latest |
| 108 | ``` |
79 | ``` |
| 109 | |
80 | |
| 110 | ### Registry Authentication |
| |
| 111 | |
| |
| 112 | Before pushing to the registry, authenticate with: |
| |
| 113 | ```bash |
| |
| 114 | podman login git.d464.sh |
| |
| 115 | ``` |
| |
| 116 | |
| |
| 117 | ### Bonsai Integration |
| |
| 118 | |
| |
| 119 | To integrate with the actual Bonsai tool, modify the `Containerfile` in the "BONSAI SETUP SECTION" to: |
| |
| 120 | |
| |
| 121 | 1. Clone or copy the Bonsai source code to `/usr/src/bonsai` |
| |
| 122 | 2. Install Bonsai's dependencies |
| |
| 123 | 3. Ensure the Bonsai tool is properly configured |
| |
| 124 | |
| |
| 125 | Example: |
| |
| 126 | ```dockerfile |
| |
| 127 | # In the BONSAI SETUP SECTION of Containerfile |
| |
| 128 | RUN git clone https://github.com/your-org/bonsai.git /usr/src/bonsai |
| |
| 129 | WORKDIR /usr/src/bonsai |
| |
| 130 | RUN pip install -r requirements.txt |
| |
| 131 | WORKDIR /app |
| |
| 132 | ``` |
| |
| 133 | |
| |
| 134 | ## Usage |
81 | ## Usage |
| 135 | |
82 | |
| 136 | 1. Open the web application in your browser |
83 | 1. Open the web application in your browser |
| @@ -167,18 +114,3 @@ Generates network files from a YAML configuration. |
| 167 | "nodes.csv": "id,label,x,y\nnode1,Node 1,0,0\n..." |
114 | "nodes.csv": "id,label,x,y\nnode1,Node 1,0,0\n..." |
| 168 | } |
115 | } |
| 169 | ``` |
116 | ``` |
| 170 | |
| |
| 171 | ## Project Structure |
| |
| 172 | |
| |
| 173 | ``` |
| |
| 174 | . |
| |
| 175 | ├── app.py # Flask backend |
| |
| 176 | ├── index.html # Main web page |
| |
| 177 | ├── script.js # Client-side JavaScript |
| |
| 178 | ├── logo.png # Bonsai logo |
| |
| 179 | ├── requirements.txt # Python dependencies |
| |
| 180 | ├── Containerfile # Container build instructions |
| |
| 181 | ├── build.sh # Container build script |
| |
| 182 | ├── .gitignore # Git ignore patterns |
| |
| 183 | └── README.md # This file |
| |
| 184 | ```
\ No newline at end of file |
| |
|