aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md80
1 files changed, 6 insertions, 74 deletions
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
3A simple web interface for the Bonsai network latency graph generator. 3A 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
78PUSH=1 ./build.sh 64just build
65# or `just --set image <custom image> build`
79``` 66```
80 67
81The 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 71just push
91podman build -t bonsai-web -f Containerfile . 72# or `just --set image <custom image> push`
92
93# Production build and push
94podman build -t git.d464.sh/diogo464/bonsai-web:latest -f Containerfile .
95podman 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
102podman run -p 5000:5000 bonsai-web:local
103```
104
105#### From Registry
106```bash 77```bash
107podman run -p 5000:5000 git.d464.sh/diogo464/bonsai-web:latest 78podman run -p 5000:5000 git.d464.sh/diogo464/bonsai-web:latest
108``` 79```
109 80
110### Registry Authentication
111
112Before pushing to the registry, authenticate with:
113```bash
114podman login git.d464.sh
115```
116
117### Bonsai Integration
118
119To integrate with the actual Bonsai tool, modify the `Containerfile` in the "BONSAI SETUP SECTION" to:
120
1211. Clone or copy the Bonsai source code to `/usr/src/bonsai`
1222. Install Bonsai's dependencies
1233. Ensure the Bonsai tool is properly configured
124
125Example:
126```dockerfile
127# In the BONSAI SETUP SECTION of Containerfile
128RUN git clone https://github.com/your-org/bonsai.git /usr/src/bonsai
129WORKDIR /usr/src/bonsai
130RUN pip install -r requirements.txt
131WORKDIR /app
132```
133
134## Usage 81## Usage
135 82
1361. Open the web application in your browser 831. 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