pediatric-ai-scribe-v3/docker-compose.e2e.yml
Daniel fac8757ce8
Some checks failed
Forgejo Android APK / Root app tests (push) Successful in 56s
Forgejo Docker Build / Root app tests (push) Successful in 48s
Forgejo Android APK / Build signed APK (push) Successful in 2m13s
Forgejo Docker Build / Build Docker image (push) Successful in 14s
Forgejo Docker Build / Deploy to the host (push) Failing after 1s
feat: My Resources has a menu, a library and three downloads
The pathway existed but was reachable only by API. It now has a tab of its own
next to the Learning Hub — related, not the same thing, and sitting together is
how someone discovers the difference — visible to every signed-in user with no
role gate in the markup.

Generate a deck or an article, see everything you have made, download each as
PowerPoint, Word or PDF, delete what you no longer want. The screen says
"Private to you" and "Nobody else sees these", because the distinction from
published Learning content is the thing a person needs to understand before
typing a patient's condition into it.

Downloads are fetched rather than linked: an <a href> cannot carry the
Authorization header. The blob is saved under the filename the server chose and
the object URL is revoked afterwards. Resource titles come from a model, so rows
are built as elements and a title is only ever assigned to textContent.

The e2e stack now joins danvics_convert too. It could previously reach only
Postgres and Redis, so a PDF download failed there in a way production would
not — which did at least prove the degradation path works: with Gotenberg
unreachable the response is "PDF conversion is unavailable right now. PowerPoint
and Word still work", and the other two formats download unaffected.

Verified in a browser as an ordinary user: the tab appears and opens, the form
swaps slide count for word count when the format changes, the library lists
their own work, and pptx, docx and pdf all download with sensible filenames
(36360, 13285 and 68310 bytes).

Also documents retrieval sizing in docs/retrieval-tuning.md — the per-feature
budgets, and RERANKER_TOP_K, which caps all of them and had until now appeared
in no configuration file at all.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dv6sqaY6Vq3ChZHMem3cnU
2026-09-11 15:00:19 +02:00

69 lines
2.7 KiB
YAML

# E2E test environment — runs a second instance of the app on port 3553 with
# Turnstile disabled so Playwright can log in without the bot challenge.
# Shares the postgres + pgdata volume with production so seeded e2e test users
# (email pattern *@ped-ai.test) persist across test runs.
#
# Bring up with:
# docker compose -f docker-compose.yml -f docker-compose.e2e.yml up -d pediatric-scribe-e2e
#
# Tear down with:
# docker compose -f docker-compose.yml -f docker-compose.e2e.yml down pediatric-scribe-e2e
services:
pediatric-scribe-e2e:
build:
context: .
args:
GIT_REVISION: ${GIT_REVISION:-unknown}
image: ped-ai-local:latest
ports:
- "127.0.0.1:3553:3000"
networks:
# Its own project network, plus the converter so PDF export is exercised
# here too. Without this the e2e stack could only reach Postgres and
# Redis, and a PDF download failed in a way production would not.
- default
- danvics_convert
env_file:
- .env
environment:
# Disable Turnstile entirely — both server-side verification AND the
# client-side widget. Without clearing the SITE_KEY the frontend tries
# to initialise the Turnstile iframe against the prod domain and
# throws error 110200, which Playwright's pageerror guard correctly
# flags as an uncaught exception.
TURNSTILE_SECRET_KEY: ""
TURNSTILE_SITE_KEY: ""
# Disable SMTP so register auto-verifies the user and returns a session
SMTP_HOST: ""
# Raise the login rate-limit so Playwright multi-worker runs don't
# trip the production 10/15min cap. Only affects this e2e container.
LOGIN_RATE_LIMIT_MAX: "500"
# Also raise the global /api/ limit so multi-spec Playwright runs
# that make hundreds of API calls don't burn through the 200/min cap.
API_RATE_LIMIT_MAX: "5000"
# Allow fetches from the two origins Playwright serves tests from —
# the in-network hostname and the host-port loopback. Without this
# the CORS middleware (scoped to /api) rejects any non-GET request
# because .env's APP_URL points at the production domain.
CORS_ORIGINS: "http://pediatric-ai-scribe-e2e:3000,http://host.docker.internal:3553,http://localhost:3553"
volumes:
- scribe-logs-e2e:/app/data/logs
depends_on:
postgres:
condition: service_healthy
container_name: pediatric-ai-scribe-e2e
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:3000/api/health"]
interval: 30s
timeout: 10s
retries: 5
start_period: 20s
volumes:
scribe-logs-e2e:
networks:
danvics_convert:
external: true