Before building, make sure Docker is up and running.
$ pnpm install # first time only
$ pnpm prisma:generate # first time only
$ pnpm buildEnsure Docker is running beforehand.
$ pnpm testExecutes E2E tests against the application started with docker compose.
$ pnpm docker-build
$ pnpm docker-compose-up
$ pnpm verify-group-chat # E2EThis mirrors the Rust example: run the Read Model Updater as an AWS Lambda on LocalStack (DynamoDB stream → Lambda → MySQL).
-
Copy
common.env.defaulttocommon.envat the repo root, or letdocker-compose-up.sh/docker-compose-e2e-test.shcreate it.common.envis gitignored. -
From the host, point the AWS CLI at
http://localhost:34566(Compose maps container4566to host34566). Inside Compose, services usehttp://localstack:4566. -
Build the deployment zip (Docker
linux/amd64, Prisma engines for Lambda):$ pnpm build-read-model-updater-lambda
Output:
dist/lambda/read-model-updater/function.zip. -
pnpm docker-compose-upandpnpm docker-compose-e2e-testcan build the zip (unlessDOCKER_COMPOSE_UP_BUILD_LAMBDA=0), wait for LocalStack, rundeploy-read-model-updater-localstack.sh, and by default stop theread-model-updater-1container to avoid double-processing the stream. SetDOCKER_COMPOSE_UP_DEPLOY_LAMBDA=0to skip deploy. The e2e script brings stacks up, deploys Lambda, then runs thee2e-testcontainer (profile: e2e) so GraphQL is ready beforeverify-group-chat.shruns. -
To deploy manually after Compose is up:
$ pnpm deploy-read-model-updater-localstack