Skip to main content

Deployment

Local Development

Docker Compose for local development is defined in infra/docker/compose.yml:

services:
mongo:
image: mongo:7
ports: ["27017:27017"]

redis:
image: redis:7
ports: ["6379:6379"]

rabbitmq:
image: rabbitmq:3-management
ports: ["5672:5672", "15672:15672"]

Start locally:

# Start dependencies
docker compose -f infra/docker/compose.yml up

# Build and run backend services
node scripts/build.js # esbuild bundles
node dist/backend.js # Express + Apollo API
node dist/scheduler.js # Queue consumers
node dist/cron.js # Scheduled tasks

# Start frontend
cd frontend && npm run dev

Build Pipeline

The project uses a custom esbuild-based build system (scripts/build.js) that produces 5 bundles:

BundleEntryOutput
backendpackages/backend/index.tsdist/backend.js
schedulerpackages/scheduler/index.tsdist/scheduler.js
cronpackages/cron/index.tsdist/cron.js
loggerpackages/logger/index.tsdist/logger.js
lambdapackages/lambda/index.tsdist/lambda.js

Production (Pulumi)

The entire AWS infrastructure is provisioned via Pulumi. See Infrastructure Overview for details.

ECS Fargate Services

ServiceImagePortCPUMemory
Appstardust-app40005121024
Schedulerstardust-scheduler-256512
Cronstardust-cron-128256
Loggerstardust-logger-128256

Environment Variables

Key env vars (validated via Zod + @t3-oss/env):

VariableSource
MONGODB_URISSM Parameter Store
REDIS_URLElastiCache / internal
RABBITMQ_URLCloudAMQP / internal
JWT_SECRETSSM Parameter Store
GITHUB_CLIENT_ID/SECRETSSM Parameter Store
AWS_REGIONPulumi stack config
AWS_*Pulumi IAM roles

Deploy Commands

# Deploy infrastructure
cd infra && pulumi up

# Build and push Docker images
cd infra && pulumi up # (includes image build)

# Frontend deployment
cd frontend && npm run build
# Hosted on Vercel / Cloudflare Pages / S3+CF