Run Etherpad by default: without it every topic page 500s
The legacy client requests an Etherpad session on every topic page whose lesson has contents, without ever checking whether the lesson contains a pad — controllers/topics.js collects `etherpadPads` and then ignores it. With Etherpad unreachable the request fails, `validUntil` comes back undefined, and `new Date(undefined * 1000)` makes Express reject the session cookie: "option expires is invalid", rendered as a 500. So Etherpad was only nominally optional. Moving it out of the `tools` profile also matches the live deployment, which always runs it. The topic pages that still 500 are courses the signed-in user is not a member of; the same page returns 200 for its own teacher. That is the legacy client rendering a 403 as a 500, upstream behaviour we don't own. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
# behaviour under test is the deployed behaviour, not a rebuild of main.
|
||||
#
|
||||
# docker compose up -d core: login, courses, boards, files
|
||||
# docker compose --profile tools up -d + etherpad, h5p, tldraw, collabora
|
||||
# docker compose --profile tools up -d + h5p, tldraw, collabora
|
||||
# docker compose --profile av up -d + virus scanning of uploads
|
||||
#
|
||||
# Everything here is a throwaway dev instance: the credentials are the upstream
|
||||
@@ -162,6 +162,26 @@ services:
|
||||
ports: ["127.0.0.1:4000:4000"]
|
||||
restart: unless-stopped
|
||||
|
||||
etherpad:
|
||||
# The collaborative text editor element.
|
||||
#
|
||||
# Core, not a "tool", however much it looks like one: the legacy client asks
|
||||
# the server for an Etherpad session on *every* topic page whose lesson has
|
||||
# contents, without checking whether the lesson contains a pad at all
|
||||
# (controllers/topics.js builds `etherpadPads` and then never reads it).
|
||||
# Unreachable, that call fails, `validUntil` arrives undefined, and
|
||||
# `new Date(undefined * 1000)` makes Express reject the session cookie —
|
||||
# "option expires is invalid", a 500 on every topic page. The live
|
||||
# deployment always runs Etherpad (ETHERPAD_REPLICAS: 1), so keeping it in
|
||||
# the default profile is both the working and the faithful choice.
|
||||
image: docker.io/etherpad/etherpad:3.3.3
|
||||
env_file: [env/etherpad.env]
|
||||
volumes:
|
||||
- ./etherpad/APIKEY.txt:/opt/etherpad-lite/APIKEY.txt:ro
|
||||
depends_on:
|
||||
mongo: {condition: service_healthy}
|
||||
restart: unless-stopped
|
||||
|
||||
proxy:
|
||||
# The single origin. Everything a browser touches goes through here, so the
|
||||
# app sees one host the way it does in production.
|
||||
@@ -173,17 +193,6 @@ services:
|
||||
restart: unless-stopped
|
||||
|
||||
# -------------------------------------------------- external tools -------
|
||||
etherpad:
|
||||
# The collaborative text editor element on column boards.
|
||||
image: docker.io/etherpad/etherpad:3.3.3
|
||||
profiles: ["tools"]
|
||||
env_file: [env/etherpad.env]
|
||||
volumes:
|
||||
- ./etherpad/APIKEY.txt:/opt/etherpad-lite/APIKEY.txt:ro
|
||||
depends_on:
|
||||
mongo: {condition: service_healthy}
|
||||
restart: unless-stopped
|
||||
|
||||
h5p-editor:
|
||||
image: quay.io/schulcloudverbund/h5p-server:${SC_VERSION:-33.40}
|
||||
profiles: ["tools"]
|
||||
|
||||
Reference in New Issue
Block a user