With .env pointing at the real account, testing against the local instance became dangerous: process env beats --env-file, so a local smoke run would crawl fixtures straight into the live index, where a per-course refresh carries them forward indefinitely. mcp-env.sh now pins its own database (schulcloud_local) and mirror as well as the instance. The override publishes the server on MCP_HOST_PORT and takes CRAWL_INTERVAL_MS from .env, since what_changed can only report what happened between crawls. The build context leaves out tmp/, which holds a mirror of the account's files, and local-instance/. probe checks live what the gap fixes established locally: the /api/v1 course and user routes, classes, room allowedOperations as an object, and the preview enums on a real file. A failure there means a feature degrades rather than breaks. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
24 lines
1.1 KiB
YAML
24 lines
1.1 KiB
YAML
# Local development only. Compose merges this automatically; it is not used on
|
|
# the Pi, where Caddy reaches the container over the shared Docker network and
|
|
# no host port is published.
|
|
services:
|
|
postgres:
|
|
ports:
|
|
# Loopback only. Lets `npm test` reach it via TEST_DATABASE_URL and lets
|
|
# the stdio server use the same index as the HTTP one.
|
|
- "127.0.0.1:55432:5432"
|
|
|
|
schulcloud-mcp:
|
|
environment:
|
|
# The bundled postgres service, reachable by name on the compose network.
|
|
DATABASE_URL: postgresql://schulcloud:${POSTGRES_PASSWORD:-schulcloud}@postgres:5432/schulcloud
|
|
# On demand by default while developing. Set CRAWL_INTERVAL_MS in .env to
|
|
# crawl on a timer instead — what_changed can only report what happened
|
|
# between crawls, so against a real account on-demand leaves it empty.
|
|
CRAWL_INTERVAL_MS: ${CRAWL_INTERVAL_MS:-0}
|
|
ports:
|
|
# Bound to loopback: this exposes the account's data, and the bearer token
|
|
# is the only thing in front of it.
|
|
# MCP_HOST_PORT moves it when 8080 is already taken on this machine.
|
|
- "127.0.0.1:${MCP_HOST_PORT:-8080}:8080"
|