diff --git a/README.md b/README.md index cad61ae..86da251 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,38 @@ - [Integrations](40-inventory/integrations.yml) - [Projects](40-inventory/projects.yml) +## Deployment + +### Quick start (this machine) + +```bash +./scripts/install.sh +``` + +- **Backend** (FastAPI): `systemctl --user status gnexus-book-backend.service` — listens on `0.0.0.0:8000` +- **Frontend** (nginx): served on port `80` from `/var/www/gnexus-book` +- **MCP Server** (SSE): `systemctl --user status gnexus-book-mcp.service` — listens on `0.0.0.0:8001`, endpoint `/sse` + +### Update / redeploy + +```bash +./scripts/deploy.sh +``` + +### Nginx (production) + +A sample nginx config is provided in `nginx/gnexus-book.conf`. To use it: + +```bash +sudo apt install nginx +sudo cp nginx/gnexus-book.conf /etc/nginx/sites-available/ +sudo ln -s /etc/nginx/sites-available/gnexus-book.conf /etc/nginx/sites-enabled/ +sudo rm -f /etc/nginx/sites-enabled/default +sudo nginx -t && sudo systemctl reload nginx +``` + +Nginx will serve the built UI from `/var/www/gnexus-book` and proxy `/api/` to the backend on port `8000`. + ## Server - [Server README](server/README.md) diff --git a/server/app/mcp_server.py b/server/app/mcp_server.py index 1f34898..0d32d45 100644 --- a/server/app/mcp_server.py +++ b/server/app/mcp_server.py @@ -157,6 +157,8 @@ "validation, pending changes, and local Git commit tools. " "Do not store raw secrets in documentation." ), + host=os.environ.get("GNEXUS_BOOK_MCP_HOST", "127.0.0.1"), + port=int(os.environ.get("GNEXUS_BOOK_MCP_PORT", "8001")), )