Skip to content

Commit f7a6068

Browse files
committed
Add Docker support and update documentation for UI
1 parent 74e3e24 commit f7a6068

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,28 @@ The UI includes a script to pull the latest YAML data from the main repository:
119119
```bash
120120
python3 scripts/update_yaml.py
121121
```
122+
123+
### Docker (Easy Local Setup)
124+
125+
To run the application without installing Node.js or Angular locally, use Docker. This setup supports "live reloading," so changes you make to the code will instantly update in the browser.
126+
127+
1. **Prerequisites:** Ensure [Docker](https://www.docker.com/get-started) and [Docker Compose](https://docs.docker.com/compose/install/) are installed.
128+
129+
2. **Navigate to the UI directory:**
130+
```bash
131+
cd dome-ml-osai-ui
132+
```
133+
134+
3. **Start the Container:**
135+
```bash
136+
docker-compose up --build
137+
```
138+
139+
4. **Access the App:**
140+
Open your browser to [http://localhost:4200](http://localhost:4200).
141+
142+
5. **Stop the Container:**
143+
Press `Ctrl+C` in the terminal, or run:
144+
```bash
145+
docker-compose down
146+
```

dome-ml-osai-ui/scripts/update_yaml.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
from datetime import datetime
1111

1212
# Configuration
13-
LOCAL_FILE_PATH = "/home/gavinfarrell/PhD_Code/dome-ml-osai-ui/src/assets/ecosystem_components_list.yml"
13+
# Use relative path to ensure it works on any machine (and inside Docker if mounted)
14+
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
15+
PROJECT_ROOT = os.path.dirname(SCRIPT_DIR)
16+
LOCAL_FILE_PATH = os.path.join(PROJECT_ROOT, "src", "assets", "ecosystem_components_list.yml")
17+
1418
GITHUB_RAW_URL = "https://raw.githubusercontent.com/BioComputingUP/OSAI_ecosystem/main/data/ecosystem_components_list.yml"
1519
BACKUP_SUFFIX = ".backup"
1620

0 commit comments

Comments
 (0)