Skip to content

feat(e2e): add Caddy-fronted Docker Compose E2E stack - #43

Merged
NoNamer777 merged 2 commits into
mainfrom
feat/e2e-caddy-compose-stack
Aug 12, 2026
Merged

feat(e2e): add Caddy-fronted Docker Compose E2E stack#43
NoNamer777 merged 2 commits into
mainfrom
feat/e2e-caddy-compose-stack

Conversation

@NoNamer777

Copy link
Copy Markdown
Member

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.

  • New standalone .docker/compose.e2e.yaml (not an override of .docker/compose.yaml): app pinned to ${IMAGE_TAG} with no next fallback, caddy reverse-proxying to it over HTTPS, gated on the app's existing HEALTHCHECK via depends_on: condition: service_healthy. No explicit teardown, the ephemeral CI runner handles it.
  • New .docker/Caddyfile: site block bound to the localhost hostname (not a bare :8443) so Caddy can mint its tls internal self-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.
  • Fixes .docker/Dockerfile's app HEALTHCHECK, which targeted http://localhost:4000/: the image's musl/wget resolves localhost to ::1 first, but nginx only binds IPv4 (its entrypoint's IPv6-listen patch can't write the read-only default.conf), so the healthcheck always failed. This reproduces against the existing, unmodified compose.yaml too (pre-existing, not introduced here), but it directly blocks this stack's depends_on gating, 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 --wait reports both containers healthy, and pnpm playwright test (in CI mode) passes against the stack with E2E_BASE_URL=https://localhost:8443.

Related issues

Resolves #42, part of #38

Checklist

  • Title and description follow the Creating a Pull Request guide
  • Commit messages follow Conventional Commits and are grouped by intent
  • Tests were added or updated as needed
  • Documentation was updated as needed
  • CI checks pass

…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
@NoNamer777
NoNamer777 merged commit 40d695f into main Aug 12, 2026
3 checks passed
@NoNamer777
NoNamer777 deleted the feat/e2e-caddy-compose-stack branch August 12, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build the Caddy-fronted Docker Compose E2E stack

1 participant