Skip to content

Add dev container configuration#273

Open
tonyxiao wants to merge 3 commits intov2from
devcontainer-setup
Open

Add dev container configuration#273
tonyxiao wants to merge 3 commits intov2from
devcontainer-setup

Conversation

@tonyxiao
Copy link
Copy Markdown
Collaborator

Summary

  • Adds .devcontainer/ with Docker Compose integration that reuses the existing compose.yml infrastructure services (Postgres 18, stripe-mock, Temporal stack)
  • Works in GitHub Codespaces, VS Code Dev Containers, DevPod, and JetBrains Gateway — one config, any runtime
  • Includes test-devcontainer.sh for in-container validation and e2e/devcontainer.test.ts for CI-side config validation (8 tests)

What's included

File Purpose
.devcontainer/devcontainer.json Main config: ports, extensions, VS Code settings, lifecycle commands
.devcontainer/docker-compose.yml includes repo compose.yml + adds app container with env vars
.devcontainer/Dockerfile Node 24 + corepack + psql + netcat
.devcontainer/test-devcontainer.sh In-container smoke test (toolchain, services, DB, env)
e2e/devcontainer.test.ts Vitest: validates config files, ports, extensions, hostnames

How it works

  1. Opens in container runtime → Docker Compose starts Postgres, stripe-mock, Temporal alongside the dev container
  2. postCreateCommand runs corepack enable && pnpm install && pnpm build
  3. All services reachable by Docker hostname (postgres, stripe-mock, temporal)
  4. Port forwarding exposes services to the host for browser/tool access

Test plan

  • e2e/devcontainer.test.ts — 8 tests pass validating config structure
  • Manual: Open in VS Code Dev Containers or Codespaces, run bash .devcontainer/test-devcontainer.sh
  • Manual: Run pnpm test and pnpm dev inside the container

🤖 Generated with Claude Code

tonyxiao and others added 3 commits April 11, 2026 06:12
Adds .devcontainer/ with Docker Compose integration that reuses the
existing compose.yml infrastructure services (Postgres 18, stripe-mock,
Temporal). Works in Codespaces, VS Code Dev Containers, DevPod, and
JetBrains Gateway. Includes validation test and in-container health
check script.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Committed-By-Agent: claude
e2e/publish.test.sh runs pnpm publish; the e2e_docker job had no toolchain,
so CI failed with 'pnpm: command not found' and npx could not resolve packages.

Made-with: Cursor
Committed-By-Agent: cursor
- e2e_docker now needs publish_npm so packages exist before npx.
- Skip redundant pnpm publish in publish.test.sh (SKIP_PUBLISH=1); the
  parallel job already republishes this commit.
- Pin npx to @stripe/sync-engine@<version from apps/engine> so we do not
  resolve registry latest (mismatched transitive versions / 404).

Made-with: Cursor
Committed-By-Agent: cursor
@tonyxiao tonyxiao marked this pull request as ready for review April 14, 2026 00:14
tonyxiao pushed a commit that referenced this pull request Apr 15, 2026
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.

1 participant