# The stack playwright.docker.config.ts starts. Also the copy-pasteable # quickstart for a user, which is why it is at the repo root and not under # tests/ — one file, one behaviour, no drift between what CI proves and what # the README tells someone to run. services: ws-scrcpy-web: build: context: . dockerfile: Dockerfile # Overridable so CI can point the suite at the tag its own build step already # produced, instead of building the same image a second time under a # different name. Defaults to the local tag for a plain `docker compose up`. image: ${WSSW_IMAGE:-ws-scrcpy-web:local} ports: # Host 8123 -> container 8000. 8123 is what tests/e2e/support/paths.ts # already exports as E2E_PORT, so every existing spec's baseURL is # unchanged and 8000 stays free for a developer's own instance. # # Bound to 127.0.0.1 deliberately. A bare "8123:8000" publishes the app on # every interface the host has, the LAN included. - "127.0.0.1:8123:8000" environment: # Pass-through, NOT a default. With no value Compose forwards the host's # variable and omits it entirely when unset, so a plain `docker compose up` # keeps the secure posture: admin actions are refused from off-box. # # It has to be here because IN A CONTAINER NOBODY IS EVER ON LOOPBACK — the # browser arrives through the Docker gateway — so `requireOperator` sees # every request as off-box. Set it (`WS_SCRCPY_ALLOW_REMOTE_ADMIN=1 docker # compose up`) to administer a container without sign-in, understanding that # it makes anyone who can reach the server an administrator. Enabling # sign-in is the supported alternative; see SECURITY.md. # # CI sets it for the container e2e tier, which is what keeps smoke row 20.6 # ("stop server & exit" in a container) testing graceful shutdown rather # than the authorization guard. - WS_SCRCPY_ALLOW_REMOTE_ADMIN volumes: - wsdata:/data volumes: wsdata: