Skip to main content

API Deployment

The API is packaged as a Docker image and designed to run on AWS ECS Fargate, though any container runtime works.

Building the Image

Running Locally

Pushing to ECR

ECS Fargate

The repository’s CI/CD pipeline (.github/workflows/) handles ECS deployment automatically on merge to main. For manual deployments:
  1. Push the image to ECR (above).
  2. Update the ECS service to use the new image revision:

Required IAM Permissions

The ECS task role needs:
  • ses:SendEmail — for transactional email
  • ecr:GetAuthorizationToken, ecr:BatchGetImage — to pull the image

Dashboard Deployment

The dashboard is a Vite-built SPA that can be hosted on any static file host.

Building

The output is in apps/web/dist/.

S3 + CloudFront

Configure the S3 bucket for static website hosting and set up a CloudFront distribution pointing to it. Set the error document to index.html to support React Router client-side routing.

Vercel / Netlify

Both platforms support Vite out of the box:
  1. Set the build command to npm run build.
  2. Set the publish directory to dist.
  3. Add your VITE_* environment variables in the platform’s settings UI.
  4. Configure rewrites so all paths resolve to index.html (for React Router).

CI/CD Pipeline

The repository uses GitHub Actions. The pipeline:
  1. Static checks — TypeScript compilation, ESLint
  2. Unit tests — Vitest
  3. API trace tests — Tusk Drift replay
  4. Deploy — Docker build → ECR push → ECS update (API) + S3 sync + CloudFront invalidation (dashboard)
Deployments to the dev environment are triggered by merges to develop. Production deployments require a PR from develop to main.

Required GitHub Secrets