flotilla/e2e/harness/zooid/docker/compose.yaml

44 lines
2 KiB
YAML
Raw Permalink Normal View History

2026-08-06 15:43:57 +00:00
# The relay the whole suite runs against. Bound to loopback only, and the one server this harness is
# allowed to connect to for real.
#
# The image is distroless and runs as `nonroot`. zooid creates DATA and MEDIA itself, but it cannot
# create their parent /app, so both have to arrive already mounted — and writable by uid 65532,
# which is what `mode` below is for: docker defaults a tmpfs to 1777 and podman does not, and a
# tmpfs the relay cannot write is a container that exits 1 the moment it opens its database.
# Nothing is persisted, so `up --force-recreate` is a guaranteed-empty database.
name: flotilla-e2e-zooid
services:
relay:
# Pinned by digest in e2e/harness/zooid/relay.ts, the only thing that brings this container up.
# No default, for the same reason the config mount below has none.
image: ${ZOOID_IMAGE:?staged by e2e/harness/zooid/relay.ts, which starts this container}
2026-08-06 15:43:57 +00:00
# The harness dials this published port and sends a `Host` per virtual relay, which is what the
# dispatcher matches against the `host` in each file under config/.
ports:
- "127.0.0.1:3334:3334"
environment:
PORT: "3334"
CONFIG: /app/config
DATA: /app/data
MEDIA: /app/media
volumes:
2026-08-20 20:33:20 +00:00
# A copy of ./config that relay.ts stages outside the repo and refreshes on every recreate,
# mounted writable because zooid saves a relay's toml back when a nip-86 call edits its name,
# description or icon. There is no default: the harness is the only thing that should bring
# this container up, and mounting ./config itself would leave the repo's fixtures rewritten
# by whatever the last test did.
2026-08-06 15:43:57 +00:00
- type: bind
2026-08-20 20:33:20 +00:00
source: "${ZOOID_CONFIG:?staged by e2e/harness/zooid/relay.ts, which starts this container}"
2026-08-06 15:43:57 +00:00
target: /app/config
- type: tmpfs
target: /app/data
tmpfs:
size: 268435456
mode: 01777
- type: tmpfs
target: /app/media
tmpfs:
size: 33554432
mode: 01777