From bb2a49956936d8be7a9a74710d34c2a9761a8fec Mon Sep 17 00:00:00 2001 From: James Wampler Date: Fri, 21 Aug 2026 09:41:56 -0700 Subject: [PATCH] Expose Novelly API port + service-key auth for MCP access to QA deploy MCP server is a stdio process run outside docker, pointed at the API over HTTP via NOVELLY_API_URL. The api container previously had no port mapping, so it was unreachable outside the compose network. --- .github/workflows/ci.yml | 2 ++ deploy/qa/docker-compose.qa.yml | 3 +++ scripts/ci/deploy.sh | 2 ++ 3 files changed, 7 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4e706dd..e81cebc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,6 +60,8 @@ jobs: REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }} ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} WEB_PORT: ${{ vars.WEB_PORT }} + API_PORT: ${{ vars.API_PORT }} + MCP_API_KEY: ${{ secrets.MCP_API_KEY }} steps: # actions/checkout@v4 is a Node-based action; this runner has no node in PATH, so # checkout plain git instead of via marketplace action. diff --git a/deploy/qa/docker-compose.qa.yml b/deploy/qa/docker-compose.qa.yml index 321d2fb..f3b1daf 100644 --- a/deploy/qa/docker-compose.qa.yml +++ b/deploy/qa/docker-compose.qa.yml @@ -17,10 +17,13 @@ services: Agent__Model: claude-sonnet-5 Agent__Effort: high Imports__RootPath: /data/imports + Auth__ServiceApiKey: ${MCP_API_KEY:-} volumes: - /mnt/storage/apps/novelly/data:/data networks: - novelly + ports: + - "${API_PORT:-5080}:8080" healthcheck: test: ["CMD-SHELL", "curl -fsS http://localhost:8080/api/health || exit 1"] interval: 10s diff --git a/scripts/ci/deploy.sh b/scripts/ci/deploy.sh index ccc894a..12faa9c 100755 --- a/scripts/ci/deploy.sh +++ b/scripts/ci/deploy.sh @@ -13,6 +13,8 @@ registry_login export API_IMAGE WEB_IMAGE export ANTHROPIC_API_KEY="${ANTHROPIC_API_KEY:-}" export WEB_PORT="${WEB_PORT:-6173}" +export API_PORT="${API_PORT:-5080}" +export MCP_API_KEY="${MCP_API_KEY:-}" COMPOSE="docker compose -f deploy/qa/docker-compose.qa.yml"