@bonnard/cli
Advanced tools
Sorry, the diff of this file is not supported yet
@@ -43,6 +43,10 @@ # ============================================================ | ||
| # Optional: custom ports (defaults: Cube=4000, Bonnard=3000). | ||
| # CUBE_PORT=4000 | ||
| # BONNARD_PORT=3000 | ||
| # ============================================================ | ||
| # DOMAIN & TLS (optional) | ||
| # ============================================================ | ||
| # Set your domain for automatic HTTPS via Let's Encrypt. | ||
| # Leave empty for HTTP on port 80 (local development). | ||
| # DOMAIN=mcp.example.com | ||
| # ============================================================ | ||
@@ -49,0 +53,0 @@ # PRODUCTION CONFIGURATION (optional) |
| volumes: | ||
| models: {} | ||
| caddy_data: {} | ||
@@ -12,4 +13,2 @@ services: | ||
| restart: unless-stopped | ||
| ports: | ||
| - "${CUBE_PORT:-4000}:4000" | ||
| volumes: | ||
@@ -36,4 +35,2 @@ - models:/cube/conf/model:ro | ||
| restart: unless-stopped | ||
| ports: | ||
| - "${BONNARD_PORT:-3000}:3000" | ||
| volumes: | ||
@@ -50,1 +47,15 @@ - models:/app/models | ||
| condition: service_healthy | ||
| caddy: | ||
| image: caddy:2-alpine | ||
| restart: unless-stopped | ||
| ports: | ||
| - "80:80" | ||
| - "443:443" | ||
| volumes: | ||
| - ./Caddyfile:/etc/caddy/Caddyfile:ro | ||
| - caddy_data:/data | ||
| environment: | ||
| DOMAIN: ${DOMAIN:-} | ||
| depends_on: | ||
| - bonnard |
@@ -90,38 +90,15 @@ # Bonnard (Self-Hosted) | ||
| ## TLS with Caddy | ||
| ## HTTPS | ||
| [Caddy](https://caddyserver.com) provides automatic HTTPS via Let's Encrypt. | ||
| Caddy is included in the Docker Compose stack. To enable automatic HTTPS: | ||
| Create a `Caddyfile` next to your `docker-compose.yml`: | ||
| 1. Point a domain at your server's IP (e.g. `mcp.example.com`) | ||
| 2. Set `DOMAIN=mcp.example.com` in `.env` | ||
| 3. Update `url` in `bon.yaml` to `https://mcp.example.com` | ||
| 4. Restart: `docker compose up -d` | ||
| ``` | ||
| bonnard.example.com { | ||
| reverse_proxy localhost:3000 | ||
| } | ||
| ``` | ||
| Caddy provisions Let's Encrypt certificates automatically. | ||
| Add Caddy to your `docker-compose.yml`: | ||
| Without `DOMAIN`, the server runs on HTTP port 80 (local development). | ||
| ```yaml | ||
| caddy: | ||
| image: caddy:2 | ||
| ports: | ||
| - "80:80" | ||
| - "443:443" | ||
| volumes: | ||
| - ./Caddyfile:/etc/caddy/Caddyfile:ro | ||
| - caddy_data:/data | ||
| restart: unless-stopped | ||
| ``` | ||
| Add the volume at the top level: | ||
| ```yaml | ||
| volumes: | ||
| models: {} | ||
| caddy_data: {} | ||
| ``` | ||
| Then remove the Bonnard port mapping (`ports: - "3000:3000"`) since Caddy handles external traffic. | ||
| ## Deploy to a VM | ||
@@ -144,4 +121,3 @@ | ||
| | `ADMIN_TOKEN` | Bearer token for API/MCP authentication | — (open) | | ||
| | `CUBE_PORT` | Cube API port | `4000` | | ||
| | `BONNARD_PORT` | Bonnard server port | `3000` | | ||
| | `DOMAIN` | Domain for automatic HTTPS (e.g. `mcp.example.com`) | — (HTTP on port 80) | | ||
| | `CORS_ORIGIN` | Allowed CORS origins | `*` | | ||
@@ -155,3 +131,3 @@ | `CUBE_VERSION` | Cube Docker image tag | `v1.6` | | ||
| # Health check | ||
| curl http://localhost:3000/health | ||
| curl http://localhost/health | ||
@@ -162,3 +138,3 @@ # View logs | ||
| # View active MCP sessions | ||
| curl -H "Authorization: Bearer <token>" http://localhost:3000/api/mcp/sessions | ||
| curl -H "Authorization: Bearer <token>" http://localhost/api/mcp/sessions | ||
| ``` | ||
@@ -165,0 +141,0 @@ |
+1
-1
| { | ||
| "name": "@bonnard/cli", | ||
| "version": "0.3.13", | ||
| "version": "0.3.14", | ||
| "type": "module", | ||
@@ -5,0 +5,0 @@ "bin": { |
Sorry, the diff of this file is too big to display
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
2408185
0.06%92
1.1%5853
0.48%