Files
Schulcloud-MCP/local-instance/env/api.env
MechaCat02 3a168e37e5 local-instance: simulate a teacher, and run the files-storage consumer
`scripts/simulate-teacher.mjs` creates, edits and deletes what teachers
create — course, room, topic, task, board, columns, cards, rich text,
link, Etherpad pad, folder, files — so the MCP server can be exercised
against content the real account has never held. It is the only thing
here that writes to a Schulcloud and refuses any non-localhost address.
`scripts/mcp-env.sh` points the server and CLI at the instance.

Two gaps it exposed in the stack itself:

The files-storage AMQP consumer is a separate entrypoint, and we were
running only the HTTP one. Nothing was bound to the `files-storage`
exchange, so `TaskService.delete` — which awaits deleteFilesOfParent
over AMQP before touching the task — hung until the request timeout.
Deleting any task or topic answered 408 with the entity still there.

The demo data is dated 2017-2018 and the v3 endpoints filter on those
dates, so a student saw no tasks at all. seed.sh now brings courses and
homework into the present, which is the difference between a fixture
that exercises the student-facing surface and one that looks empty.

Teams turn out to be uncreatable through the API (the legacy service
registers no `create`, v3 has no route), and a new board is unpublished
and 403s for students, so the simulation adopts a seeded team and leaves
one board a draft on purpose.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-13 15:40:46 +02:00

101 lines
4.2 KiB
Bash

# The schulcloud-server API app (apps/server.app).
#
# The FEATURE_* block below is not hand-picked: it is a replay of
# GET /api/v3/config/public from the live schulcloud-thueringen.de, so the local
# instance exposes the same surface to students that the real one does.
# Regenerate with ./scripts/sync-feature-flags.sh.
PORT=3030
# Internal service addresses (compose DNS), not the browser-facing origin.
API_HOST=http://api:3030/api
FILES_STORAGE__SERVICE_BASE_URL=http://file-storage:4444
LICENSE_SUMMARY_URL=http://api:3030/api/licenses/summary
ROOM_MEMBER_INFO_URL=http://api:3030/api/rooms/member-info
ALERT_STATUS_URL=https://status.schulcloud-thueringen.de/
CALENDAR_SERVICE_ENABLED=false
NEST_LOG_LEVEL=info
# Etherpad (see ../etherpad/APIKEY.txt)
ETHERPAD__URI=http://etherpad:9001/api/1
ETHERPAD__PAD_URI=http://localhost:4400/etherpad/p
ETHERPAD__API_KEY=381d67e6347d235ac9446da3ea10a82efd6f8ae09fa2e90efeda80f82feeb4fd
# tldraw + admin API
TLDRAW__WEBSOCKET_URL=ws://localhost:4400/tldraw-server
TLDRAW_ADMIN_API_CLIENT__BASE_URL=http://tldraw-server:3349
TLDRAW_ADMIN_API_CLIENT__API_KEY=tldraw-admin-key
ADMIN_API__ALLOWED_API_KEYS=thisisasupersecureapikeythatisabsolutelysave
# Teacher/student visibility, as configured for thr.
TEACHER_STUDENT_VISIBILITY__IS_CONFIGURABLE=false
TEACHER_STUDENT_VISIBILITY__IS_ENABLED_BY_DEFAULT=true
TEACHER_STUDENT_VISIBILITY__IS_VISIBLE=false
# --- feature flags, mirrored from the live instance ----------------------
FEATURE_ADMINISTRATE_ROOMS_ENABLED=true
FEATURE_AI_TUTOR_ENABLED=false
FEATURE_ALLOW_INSECURE_LDAP_URL_ENABLED=false
FEATURE_BOARD_LAYOUT_ENABLED=true
FEATURE_BOARD_READERS_CAN_EDIT_TOGGLE=true
FEATURE_COLUMN_BOARD_COLLABORATIVE_TEXT_EDITOR_ENABLED=true
FEATURE_COLUMN_BOARD_COLLABORA_ENABLED=true
FEATURE_COLUMN_BOARD_ENABLED=true
FEATURE_COLUMN_BOARD_EXTERNAL_TOOLS_ENABLED=true
FEATURE_COLUMN_BOARD_FILE_FOLDER_ENABLED=true
FEATURE_COLUMN_BOARD_H5P_ENABLED=true
FEATURE_COLUMN_BOARD_LINK_ELEMENT_ENABLED=true
FEATURE_COLUMN_BOARD_SHARE=true
FEATURE_COLUMN_BOARD_SOCKET_ENABLED=true
# local override (live: true) — needs infrastructure we do not run
FEATURE_COLUMN_BOARD_VIDEOCONFERENCE_ENABLED=false
FEATURE_COMMON_CARTRIDGE_COURSE_EXPORT_ENABLED=false
FEATURE_COMMON_CARTRIDGE_COURSE_IMPORT_ENABLED=false
FEATURE_COMMON_CARTRIDGE_COURSE_IMPORT_MAX_FILE_SIZE=1073741824
# local override (live: true) — otherwise every seeded user hits a consent wall
FEATURE_CONSENT_NECESSARY=false
FEATURE_COPY_SERVICE_ENABLED=true
FEATURE_COURSE_SHARE=true
FEATURE_CTL_TOOLS_COPY_ENABLED=true
FEATURE_ENABLE_LDAP_SYNC_DURING_MIGRATION=false
FEATURE_EXTERNAL_PERSON_REGISTRATION_ENABLED=false
FEATURE_EXTERNAL_SYSTEM_LOGOUT_ENABLED=false
FEATURE_FWU_CONTENT_ENABLED=false
FEATURE_LESSON_SHARE=true
FEATURE_LOGIN_LINK_ENABLED=false
FEATURE_MEDIA_SHELF_ENABLED=true
FEATURE_NOTIFICATIONS_ENABLED=false
FEATURE_PREFERRED_CTL_TOOLS_ENABLED=true
FEATURE_ROOM_ADD_EXTERNAL_PERSONS_ENABLED=false
FEATURE_ROOM_COPY_ENABLED=true
FEATURE_ROOM_LINK_INVITATION_EXTERNAL_PERSONS_ENABLED=false
FEATURE_ROOM_REGISTER_EXTERNAL_PERSONS_ENABLED=false
FEATURE_ROOM_SHARE=true
FEATURE_SCHOOL_POLICY_ENABLED_NEW=true
FEATURE_SCHOOL_TERMS_OF_USE_ENABLED=true
FEATURE_SCHULCONNEX_COURSE_SYNC_ENABLED=false
FEATURE_SCHULCONNEX_MEDIA_LICENSE_ENABLED=false
FEATURE_SHOW_MIGRATION_WIZARD=false
FEATURE_SHOW_OUTDATED_USERS=false
FEATURE_TASK_SHARE=true
FEATURE_TEAMS_ENABLED=true
FEATURE_TEAM_CREATE_ROOM_ENABLED=true
FEATURE_TLDRAW_ENABLED=true
FEATURE_USER_LOGIN_MIGRATION_ENABLED=false
FEATURE_USER_MIGRATION_ENABLED=false
# local override (live: true) — needs infrastructure we do not run
FEATURE_VIDEOCONFERENCE_ENABLED=false
FEATURE_VIDIS_MEDIA_ACTIVATIONS_ENABLED=false
# --- required-but-unused endpoints ---------------------------------------
# The config classes validate these as present strings even when the feature
# is off, so they get a placeholder rather than a real service. Hydra is the
# OAuth2 provider behind external tool launches; we do not run it.
HYDRA_URI=http://hydra.invalid:4444
# Calendar. The live deployment runs a schulcloud-calendar service and this
# stack does not. Deletions still succeed: the calendar call fails and is
# tolerated. Nothing here reads calendars.
CALENDAR_SERVICE_ENABLED=false