From 605829dfc31e8f834f9cc38c0e977e3e20373da2 Mon Sep 17 00:00:00 2001 From: Jeremie Fraeys Date: Sat, 6 Dec 2025 13:46:40 -0500 Subject: [PATCH] Update documentation for new features and fix outdated references - Update deployment.md to reference new deployments/ directory structure - Update CLI reference with new multi-user authentication system - Add roles and permissions examples to configuration - Fix docker-compose paths in testing documentation - Remove references to non-existent docker-compose.test.yml - Update troubleshooting with correct test commands - Remove misplaced README files from test directories --- docs/src/cli-reference.md | 20 ++++++++++++++++---- docs/src/deployment.md | 14 ++++++++++---- docs/src/quick-start-testing.md | 4 ++-- docs/src/testing-protocol.md | 2 +- docs/src/troubleshooting.md | 2 +- 5 files changed, 30 insertions(+), 12 deletions(-) diff --git a/docs/src/cli-reference.md b/docs/src/cli-reference.md index 74dad85..12942e7 100644 --- a/docs/src/cli-reference.md +++ b/docs/src/cli-reference.md @@ -276,14 +276,26 @@ Main configuration file: `configs/config-local.yaml` auth: enabled: true api_keys: - homelab_user: - hash: "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8" + dev_user: + hash: "2baf1f40105d9501fe319a8ec463fdf4325a2a5df445adf3f572f626253678c9" admin: true + roles: + - admin + permissions: + '*': true + researcher_user: + hash: "ef92b778ba7a6c8f2150019a5678047b6a9a2b95cef81895吧18f9b35c54d2e3ae" + admin: false + roles: + - researcher + permissions: + 'experiments': true + 'datasets': true server: address: ":9101" tls: - enabled: true + enabled: false # Set to true for production cert_file: "./ssl/cert.pem" key_file: "./ssl/key.pem" @@ -294,7 +306,7 @@ security: ip_whitelist: - "127.0.0.1" - "::1" - - "192.168.0.0/16" + - "localhost" - "10.0.0.0/8" ``` diff --git a/docs/src/deployment.md b/docs/src/deployment.md index c9eaab1..5005ec6 100644 --- a/docs/src/deployment.md +++ b/docs/src/deployment.md @@ -74,11 +74,17 @@ docker run -d \ #### Docker Compose ```bash -# Production mode -docker-compose -f docker-compose.yml up -d +# Development mode (uses root docker-compose.yml) +docker-compose up -d -# Development mode with logs -docker-compose -f docker-compose.yml up +# Production deployment +docker-compose -f deployments/docker-compose.prod.yml up -d + +# Secure homelab deployment +docker-compose -f deployments/docker-compose.homelab-secure.yml up -d + +# With custom configuration +docker-compose -f deployments/docker-compose.prod.yml up --env-file .env.prod ``` ### 3. Homelab Setup diff --git a/docs/src/quick-start-testing.md b/docs/src/quick-start-testing.md index e350ce8..5349d83 100644 --- a/docs/src/quick-start-testing.md +++ b/docs/src/quick-start-testing.md @@ -19,7 +19,7 @@ make self-cleanup ### 2. Start Services ```bash -docker-compose -f docker-compose.prod.yml up -d +docker-compose -f deployments/docker-compose.prod.yml up -d ``` ### 3. Test Authentication @@ -100,7 +100,7 @@ Tasks: X total, X queued, X running, X failed, X completed docker ps --filter "name=ml-" # Start services -docker-compose -f docker-compose.prod.yml up -d +docker-compose -f deployments/docker-compose.prod.yml up -d # Check logs docker logs ml-prod-api diff --git a/docs/src/testing-protocol.md b/docs/src/testing-protocol.md index ff21ba5..ec0075c 100644 --- a/docs/src/testing-protocol.md +++ b/docs/src/testing-protocol.md @@ -74,7 +74,7 @@ echo "analysis job" | ./cli/zig-out/bin/ml queue analysis-job #### 3.1 Container Startup ```bash # Start production environment -docker-compose -f docker-compose.prod.yml up -d +docker-compose -f deployments/docker-compose.prod.yml up -d # Check container status docker ps --filter "name=ml-" diff --git a/docs/src/troubleshooting.md b/docs/src/troubleshooting.md index c9f2ee9..8ff6cfb 100644 --- a/docs/src/troubleshooting.md +++ b/docs/src/troubleshooting.md @@ -65,7 +65,7 @@ docker-compose exec redis redis-cli ping ## Development Issues - **Build fails**: `go mod tidy` and `cd cli && rm -rf zig-out zig-cache` -- **Tests fail**: Start test dependencies with `docker-compose -f docker-compose.test.yml up -d` +- **Tests fail**: Start test dependencies with `docker-compose up -d` or `make test-auth` ## CLI Issues - **Not found**: `cd cli && zig build dev`