rework server startup and cli
Some checks failed
Security Scan / dependency-check (push) Successful in 43s
Security Scan / security (push) Successful in 47s
Test Suite / lint (push) Failing after 29s
Test Suite / test (3.11) (push) Successful in 1m28s
Test Suite / build (push) Has been skipped

This changes the dockerfile as well.
This commit is contained in:
2025-10-01 19:01:13 -07:00
parent 0d4145df06
commit d66a20ddda
14 changed files with 195 additions and 177 deletions

View File

@@ -39,7 +39,7 @@ documents and prompts to understand how queries relate to your content.
uv tool install embeddingbuddy
# Run the application
embeddingbuddy
embeddingbuddy serve
```
**Option 2: Install with pip/pipx**
@@ -124,26 +124,18 @@ uv sync
2. **Run the application:**
**Development mode** (with auto-reload):
```bash
uv run run_dev.py
```
# Production mode (no debug, no auto-reload)
embeddingbuddy serve
**Production mode** (with Gunicorn WSGI server):
# Development mode (debug + auto-reload on code changes)
embeddingbuddy serve --dev
```bash
# Install production dependencies
uv sync --extra prod
# Debug logging only (no auto-reload)
embeddingbuddy serve --debug
# Run in production mode
uv run run_prod.py
```
**Legacy mode** (basic Dash server):
```bash
uv run main.py
# Custom host/port
embeddingbuddy serve --host 0.0.0.0 --port 8080
```
3. **Open your browser** to <http://127.0.0.1:8050>
@@ -231,10 +223,8 @@ src/embeddingbuddy/
│ └── interactions.py # User interaction callbacks
└── utils/ # Utility functions
main.py # Application runner (at project root)
main.py # Application runner (at project root)
run_dev.py # Development server runner
run_prod.py # Production server runner
# CLI entry point
embeddingbuddy serve # Main CLI command to start the server
```
### Testing