diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d1ce90f..ad1ebec 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -39,6 +39,7 @@ jobs: profile: single-user markers: "(smoke and not oauth and not keycloak and not login_flow and not multi_user_basic) or (integration and not oauth and not keycloak and not login_flow and not multi_user_basic)" wait-port: 8000 + mcp-internal-url: "http://mcp:8000" needs-playwright: false extra-args: >- --ignore=tests/integration/test_qdrant_collection_creation.py @@ -48,6 +49,7 @@ jobs: profile: multi-user-basic markers: "multi_user_basic" wait-port: 8003 + mcp-internal-url: "http://mcp-multi-user-basic:8000" needs-playwright: false extra-args: "" @@ -57,6 +59,7 @@ jobs: profile: oauth markers: "oauth and not keycloak" wait-port: 8001 + mcp-internal-url: "http://mcp-oauth:8001" needs-playwright: true extra-args: "" @@ -64,6 +67,7 @@ jobs: profile: login-flow markers: "login_flow" wait-port: 8004 + mcp-internal-url: "http://mcp-login-flow:8004" needs-playwright: true extra-args: "" @@ -106,6 +110,8 @@ jobs: compose-file: "./docker-compose.yml" compose-flags: "--profile ${{ matrix.profile }}" up-flags: "--build" + env: + MCP_SERVER_URL: ${{ matrix.mcp-internal-url }} - name: Install the latest version of uv uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0 @@ -120,7 +126,7 @@ jobs: echo "Waiting for Nextcloud at http://localhost:8080..." max_attempts=60 attempt=0 - until curl -o /dev/null -s -w "%{http_code}\n" http://localhost:8080/ocs/v2.php/apps/serverinfo/api/v1/info | grep -q "401"; do + until curl -sSf http://localhost:8080/status.php 2>/dev/null | grep -q '"installed":true'; do attempt=$((attempt + 1)) if [ $attempt -ge $max_attempts ]; then echo "Nextcloud did not become ready in time." diff --git a/app-hooks/post-installation/25-configure-mcp-server-url.sh b/app-hooks/post-installation/25-configure-mcp-server-url.sh index daa9df0..3132672 100755 --- a/app-hooks/post-installation/25-configure-mcp-server-url.sh +++ b/app-hooks/post-installation/25-configure-mcp-server-url.sh @@ -4,9 +4,10 @@ set -e -# The MCP multi-user BasicAuth service runs on port 8000 inside the container -# From Nextcloud's perspective (inside Docker network), we reach it via service name -MCP_SERVER_URL="${MCP_SERVER_URL:-http://mcp-multi-user-basic:8000}" +if [ -z "${MCP_SERVER_URL:-}" ]; then + echo "MCP_SERVER_URL not set, skipping Astrolabe MCP server URL configuration" + exit 0 +fi echo "Configuring MCP server URL: $MCP_SERVER_URL" diff --git a/docker-compose.yml b/docker-compose.yml index 9bd0a2e..b882570 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -47,6 +47,7 @@ services: - MYSQL_USER=nextcloud - MYSQL_HOST=db - REDIS_HOST=redis + - MCP_SERVER_URL=${MCP_SERVER_URL:-} healthcheck: test: ["CMD-SHELL", "curl -Ss http://localhost/status.php | grep '\"installed\":true' || exit 1"] interval: 10s