feat(e2e): add Caddy-fronted Docker Compose E2E stack - #43
Merged
Conversation
…t lookup failure The nginx runtime image only binds IPv4 (its entrypoint's usual IPv6-listen patch can't write to the read-only default.conf), but the image's musl/wget resolves "localhost" to ::1 first, so the HEALTHCHECK always failed. Verified this reproduces against the existing compose.yaml stack, unrelated to the new E2E stack that depends on this healthcheck succeeding.
New standalone .docker/compose.e2e.yaml (not an override of compose.yaml)
fronts the app image with Caddy over HTTPS for CI's E2E run: pinned to
${IMAGE_TAG} with no `next` fallback, gated on the app's HEALTHCHECK via
depends_on, no explicit teardown (the ephemeral CI runner handles it).
Caddy's site block is bound to the `localhost` hostname specifically so it
can mint its `tls internal` cert proactively at startup; a bare `:8443`
address needs on-demand TLS, which Caddy disables by default and causes the
handshake to fail with a TLS internal-error alert.
Verified locally end to end: `docker compose up -d --wait` reports both
containers healthy, and `pnpm playwright test` passes against the stack with
E2E_BASE_URL pointed at https://localhost:8443.
Part of #38
This was referenced Aug 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Builds the Caddy-fronted Docker Compose E2E stack designed in Design the Caddy-fronted Docker Compose E2E stack, part of Add Playwright end-to-end testing.
.docker/compose.e2e.yaml(not an override of.docker/compose.yaml):apppinned to${IMAGE_TAG}with nonextfallback,caddyreverse-proxying to it over HTTPS, gated on the app's existingHEALTHCHECKviadepends_on: condition: service_healthy. No explicit teardown, the ephemeral CI runner handles it..docker/Caddyfile: site block bound to thelocalhosthostname (not a bare:8443) so Caddy can mint itstls internalself-signed cert proactively at startup. A wildcard address needs on-demand TLS, which Caddy disables by default and would fail the handshake with a TLS internal-error alert..docker/Dockerfile's appHEALTHCHECK, which targetedhttp://localhost:4000/: the image's musl/wget resolveslocalhostto::1first, but nginx only binds IPv4 (its entrypoint's IPv6-listen patch can't write the read-onlydefault.conf), so the healthcheck always failed. This reproduces against the existing, unmodifiedcompose.yamltoo (pre-existing, not introduced here), but it directly blocks this stack'sdepends_ongating, so it's fixed here rather than as a separate follow-up.Verified locally end to end:
docker compose -f .docker/compose.e2e.yaml up -d --waitreports both containers healthy, andpnpm playwright test(inCImode) passes against the stack withE2E_BASE_URL=https://localhost:8443.Related issues
Resolves #42, part of #38
Checklist